Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

how to get requestDispatcher form servletContext

 
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).]
 
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.
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic