tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Application looping
Date Tue, 14 Dec 2004 13:56:23 GMT

Two ideas: one, always make sure to return (i.e. a return; statement)
after a request dispatcher forward call.  Two, take Apache out of the
mix for now, test tomcat-standalone.  Once that works, if you need
Apache you can bring it back in and worry about its configuration.

Yoav Shapira

>-----Original Message-----
>From: Jim Lynch []
>Sent: Tuesday, December 14, 2004 8:36 AM
>To: Tomcat Users List
>Subject: Application looping
>Hi, all,
>I'm attempting to port an application from one system to another.  I
>originally wrote it on a debian system and ported it to a RH 7.2
>system.  Now I'm trying to move it to a RH 9 system.  I installed the
>latest Tomcat 4.1.31, java 1.4.2_06 and Apache 1.3.  Orignally this
>system had Apache 2, java 1.4.2_05 and Tomcat 4.1.30.  I was never able
>to get mod_jk2 working so that's why I backed off to Apache 1.3.  I
>don't think that made any difference since the application continues to
>loop in either configuration.  It boils down to the following code.
>I have a method in my servlet class that looks like:
>  protected void getJspPage(HttpServletRequest request,
>                            HttpServletResponse response, String
>    RequestDispatcher dispatcher =
>    try{
>      _logger.debug("Dispatcher is Dispatching "+pageName);
>      dispatcher.forward(request, response);
>      _logger.debug("Done");
>    }catch ( Exception e ) {
>      _logger.debug("Exception in RequestHandler.getJspPage -
>    }
>  }
>It is invoked by the following:
>  private final String SELECT_PAGE ="nindex.jsp";
>      request.setAttribute("Notes","Add unique notes for this data
>      getJspPage(request, response, SELECT_PAGE);
>      _logger.debug("Good bye");
>      return;
>I have a javascript alert message in nindex.jsp that tells me it was
>loaded into the browser.
>The problem is that the dispatcher.forward method never returns.  I
>never see the "Good bye" message in the log.
>Here's from the log:
>04-12-14 07:01:40|DEBUG|
>manpower.servlets.NafoServlet|Dispatcher is Dispatching nindex.jsp
>04-12-14 07:01:40|DEBUG|           manpower.servlets.NafoServlet|Into
>NafoServlet Url =/nindex.jsp
>04-12-14 07:01:40|DEBUG|
>manpower.servlets.NafoServlet|********************     Resources
>running ****************
>The first line is from the previously mentioned method.  The second and
>third line are from the servelet and are issued when the servlet
>starts.  The alert message never gets displayed except the first time
>the jsp is loaded.
>The log fills up with messages showing the same code being executed
>and over.  Note there is no delay in the time the servlet (supposedly)
>ends and starts up again.
>I'm stumped.  It continues to work on Debian and RH 7.2 but fails on RH
>9 with updated Tomcat and Java.
>Any suggestions?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message