I got my codes running on both locally and also on the webhoster's website. Tested many times. However each morning when I woke up and test it again the servlet crashed! Everytime I have to get the webhoster to restart the tomcat at their side. But the problem is they are not working on Saturdays or Sundays. Note that the problem occurs each morning!
I encounter HTTP Status 500. The problem associated with servlets that crash or return improperly formatted header. However I had already run and tested the codes locally many times, so that shouldn't be the problem right?
So what could be the problem??:
[ July 09, 2004: Message edited by: Frankie Chee ]
it is referring to the *source code* file that Tomcat creates from your JSP file.
Search in the $CATALINA_HOME/work directory for customerB_jsp.java (it will be in a subdirectory of the work directory). What is happening at or around line 89 of this file?
Joined: Oct 26, 2003
thanks for the pointers, this might help us to get closer to the problem.
I had 3 files, customerA_jsp, customerB_jsp, engineer_jsp. I took a look at the compile JSP codes. The error messages are all pointing at the same problem which is the iterator for a vector.
It's strange as it occurs every morning. But once the server is restarted, the problem disappears.
Throughout the night while we are asleep, no one is able to access the web application because we are the only ones accessible to it as of now.
Could it be that tomcat or linux-apache disable some settings automatically after the application is passive after a long period of time(7 hours)? And thats why we were able to access the web application in the morning?
[ July 13, 2004: Message edited by: Frankie Chee ] [ July 14, 2004: Message edited by: Frankie Chee ]
Author and all-around good cowpoke
Joined: Mar 22, 2000
The only cause I can think of for that exception is that the request has no attribute named "customerList" - you should insert a check for v == null before trying to do anything with it. Since request objects can only get an attribute when it has been set by another program handling the request and using forward or include, I would look at where that is supposed to have been set. Bill
ArrayList is the newer API, and should be used in almost all cases where you used to use Vector. I wouldn't know if a Vector is "known" for problems like "this", because we haven't established what "this" is.
The most likely cause is the database connections.
Also.. this should have registered as a SQLException, so perhaps the code that does the database work is being too silent on this type of Exception The above code, or code like it, would produce the error you've encountered.