This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes getDispatcher().forward() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "getDispatcher().forward()" Watch "getDispatcher().forward()" New topic
Author

getDispatcher().forward()

Sajith Sidharthan
Greenhorn

Joined: Mar 31, 2004
Posts: 2
Previously I was using the request.sendRedirect method to pass the control from my servlet to the jsp pages and I was retrieving the data from the DB directly from the jsp pages. Now I have to get the data from the servlet and then forward it to the jsp pages, this can be done either by passing it through session or by setAttribute method. By using the setAttribute and forward I am getting the data on the page but the image paths set there are incorrect. The paths are relative to the servlet instead of relative to the jsp page.
Is there any other method to do so without changing the paths.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

See this recent topic.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getDispatcher().forward()