Hello

I have a problem with my servlets. I have created a number of servlets that
connect to a database, access a particular table, and insert the database
information into skeletal HTML. When I view my page on Tomcat port
8090(changed from port 8080 due to DB probs) by entering
http://localhost:8090/servlet/UsefulAddresses for example, it loads with no
errors. However when I refresh the page I get this error:

Error: 500: Location: /servlet/UsefulAddresses: Internal Servlet Error:
: java.lang.NullPointerException
 at org.gjt.mm.mysql.Statement.executeQuery(Statement.java)
 at org.gjt.mm.mysql.jdbc2.Statement.executeQuery(Statement.java:78)
 at UsefulAddresses.doGet(UsefulAddresses.java:50)

If i enter the servlet URL in the address bar again press return it returns
to the error free page! Every time I refresh this page or any other of my
servlets I get this error. Could anyone please tell me why this is. My
servlet code is the next email.

Andrew


 

Reply via email to