I would like to connect my application via the internet to a server which has the MySQL Database.
How would I do that? And what's the Java Servlet
to be used to connect?
I would like to connect my application via the internet to a server which has the MySQL Database.
How would I do that? And what's the Java Servlet
to be used to connect?
You can use java.net.URLConnection
or the more convenienced Apache HttpComponents Client to interact with arbitrary web resources.
I don't think using barebone servlets is the best way to acheive what you want. I would do something like this:
The most "modern" way to do this is using RESTful web service. I do not know how is your server side code built, but if I start to develop from scratch I'd use Spring framwork that has perfect support of REST web services.