Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get requestDispatcher form servletContext

 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get requestDispatcher from servletContext.
It says I have to specify the absolute path for servletContext to get requestDispatcher. I used "d:/jakarta-tomcat-4.0/webapps/ch07/web/mediatorview/BabyGame3.jsp" and "http://localhost:8080/ch07/web/mediatorview/BabyGame3.jsp", both not works. How can I use it.
Thanks


[This message has been edited by Win Yu (edited November 15, 2001).]
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Absolute path always start with a /. The path for ServletContext starts at your webapp directory (Which appears to be ch07) so, try using
/web/mediatorview/BabyGame3.jsp and this should work.
------------------
I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
[This message has been edited by Carl Trusiak (edited November 15, 2001).]
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,Carl. you are great.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic