I have UserRegistration servlet that fetches parameters from register.jsp and add records to RegisteredUser db through JDBC on Tomcat.
what is wrong in the code as when i run the jsp it shows all the elements of HTML form. but when i type in something in TextBox and submit it, Tomcat says "you are not connected to the internet". I can visit yahoo though from the same webbrowser. Also it does not add any records in RegisteredUser table.
Agree with Ulf Dittmer, there could be a lot of reasons why you see that error...but just by looking at your code snippet, Should'nt you be using a Prepared Statement? and if you are not, then the ?'s should be replaced with actual values and the value key word needs to be values.
posted 7 years ago
curly closing brace in line 6
was a typo. Corrected.
Could you please suggest a working link/example example of PreparedStatement generic class and its methods.
Thanks a lot...I can check a record in the same db in the same project through a Login.jsp and LoginServlet. Do I have to close the jdbc connection for another doPost method to connect??