aspose file tools*
The moose likes Servlets and the fly likes RequestDispatcher forward method handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatcher forward method handling" Watch "RequestDispatcher forward method handling" New topic
Author

RequestDispatcher forward method handling

Satyanarayana Chelikani
Greenhorn

Joined: Feb 06, 2008
Posts: 3
Hi,

I think i have a problem with requestdispatcher and forward method as we are migrating our project from tomcat 4.1 to tomcat 5.5.

The code written works fine with tomcat 4.1 but with tomcat 5.5 after the we are calling the getRequestDispatcher(path).forward(req,res) method the requested jsp should be displayed on the browser, which is not happening.

Can you guide me in this regard as I couldn't pinpoint the exact error location.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What is happening?
Have you looked at the tomcat logs to see if something is going wrong?

I, personally, didn't notice any differences in requestDispatcher handling between 4.1 and 5x and I rely on it a lot.
If nothing is showing up in your logs, maybe you can put together a small code example that shows this problem and post it.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Satyanarayana Chelikani
Greenhorn

Joined: Feb 06, 2008
Posts: 3
Hi Ben,

Thanks for your reply.

There no error logged in the log file. It is waiting for the server response until the time out period with out any errors and once the session gets timed out the page is displayed

Another option is that if I use an include instead of forward and using flushBuffer to commit the work its working fine.

Can you guide me with the possibilities of the errors.

Thanks

Satya
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Now would be a good time for you to post the code that performs the forward.
Without seeing what you've got it would be hard for anyone to figure out what's going wrong with your app.
Satyanarayana Chelikani
Greenhorn

Joined: Feb 06, 2008
Posts: 3
Hi,

The code for handling the forward message is as follows:




Thanks

Satya

[ UD: Added CODE tags. Please UseCodeTags whenever you post code of any length. The code is just unreadable otherwise. ]
[ February 06, 2008: Message edited by: Ulf Dittmer ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RequestDispatcher forward method handling
 
Similar Threads
JSTL and EL
response.sendRedirect vs. request.getRequestDispatcher
allowChunking in Tomcat 5.x
Can I use JSTL within a Servlet?
a simple question