0

i have designed a website using JSP and mysql, there is an enquiry form in that website ,when one fills the form the details automaticaly go into databse as the logic goes..but my problem is on localhost(tomcat) when i fill the form and submit, a retrieved form is displayed which shows my entry..but when i hosted the website the data is not being retrieved ...which means it is not geting connected to the server database which i created on putty.. can anyone please help me on this.i am new to jsp ..i just cannot get the logic.i mean on local host alls well but nt on the server..can anyone help step by step on this..please.
my website link is www.dcg.net.in
u can try and fill the form ..
it will give you a blank retrieved form..

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by peter_budo
0

you need to get the ip address of your remote server and then replace localhost with it in your connection url

0

String connectionURL = "jdbc:mysql://ip-address:3306/student";

This is how i have done the connection. Is it write.
Anything else is needed? I mean do i need to mention a username & password for Mysql as i had done for localhost? Below is the code :
connection = DriverManager.getConnection
(connectionURL, "root", "xxxxxx");

0

Make sure that your MySQL is actually externally accessible, many providers have it as local.
Make sure that you have JConnector.
If this still doesn't work don't forget to check servers logs.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.