File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Here's a fun one... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Here Watch "Here New topic

Here's a fun one...

Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
{this may be a websphere question, but here it goes...}
I have a servlet that was running fine last week. Now, when I try to run it (running on a test server in WebSphere Application Developer Studio 4) I can compile the servlet, run a JSP form to pass the data to the servlet, and it creates an HTML file for display of the information it pulls from a database.
The fun part is that when I go back (using history.back() )to the jsp page and submit a new query, I get the following message:
[5/28/02 11:02:25:859 EDT] 22538893 SystemOut U The url cannot be null
If I recompile the servlet (or restart the server), it works once then does the same thing again...
Any thoughts?

[ May 28, 2002: Message edited by: Sam Smoot ]

CNSS/NSA Infosec Professional,<br />Software Engineer
saumil shukla
Ranch Hand

Joined: Dec 01, 2000
Posts: 47
If the query string has some association with particular session ID, then using a bookmarked url may cause issues.
Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
The servlet calls a loader class that calls a connection class that connects to the database. I'm not sure, but I think the connection is not invoked at each request, but only on the first request so that subsequent calls do not get the information from the properties file.
Does this sound correct?
The ConnFactory.class connects to the database.
this is the code:

This is the file:
Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
Ok.. we figger'd it out... Our connection manager wasn't passing the connect string on the second pass. It thought it was already initialized.
Maby next time I'll know what I'm doing? :roll:
[ May 29, 2002: Message edited by: Sam Smoot ]
I agree. Here's the link:
subject: Here's a fun one...
It's not a secret anymore!