Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
ServletExec Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 138
Product ServletExec
Category Miscellaneous
Question When I request a JSP or Servlet, it executes several times in a row. But I only requested it once. What is wrong?
Answer In the few cases where we have seen this problem the cause has been the HTML.
For example, a JSP that contains an empty image source like this:
<IMG SRC="" />
results in the browser sending a second request to the HTTP Web Server (using GET) for the same resource.
Giving the SRC attribute a non-empty value causes the problem to disappear.
Another example would be a JSP or Servlet that contains or emits incorrect HTML syntax like this:
<body background="#FFFFFF">
using the correct:
<body bgcolor="#FFFFFF">
alleviates the problem.
We have seen this behavior with both Microsoft Internet Explorer 5.5 and Netscape Navigator 4.7 browsers. This problem is not due to ServletExec. It is due to how the browser reacts to invalid or unexpected HTML that it parses. If you are seeing this problem, check the HTTP Web Server access log. It will likely show 2 or more distinct requests with identical timestamps. Another way to test to see if this is the problem is to have your JSP or Servlet log a message to the ServletExec log file each time it is accessed. Print out the timestamp and see if your browser it hitting your resource repeatedly. If so, and your browser is not sending the session id in each request to a JSP then you may start seeing OutOfMemoryException since JSPs create a session object by default.
Another way to possibly isolate the problem would be to use a different browser brand and/or version. Another way to isolate the problem is to test using TestServlet or DateServlet. If you close out all your browser instances, reinitialize ServletExec, get a fresh browser window and hit any of the example resources that come with ServletExec such as TestServlet or DateServlet or hangman.jsp (and hit nothing else) are you able to make the problem occur?

company media information terms of use privacy policy contact us