• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request dispatcher object in servlet

 
saahil sinha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,
I need help with request dispatcher used in servlet to forward request to jsp.I have stored my file display.jsp in tomcat 4.1\webapps\ROOT directory now how do specify the path in request dipatcher do i specify it as /display.jsp or c:\program files\apache group\tomcat 4.1\webapps\root\display.jsp.
 
suresh guru
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u have to use a path relative to the ROOT context
for ex getRequestDispatcher("/jsp/page.jsp").forward(req,res);
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic