This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getDispatcher().forward()

 
Sajith Sidharthan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic