Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

get context path from ServletContext

843841Apr 29 2003 — edited Apr 13 2007
Does anyone know if there is a way to get the context path from the servlet context?

I am trying to write a ServletContext listener (or even a servlet that runs something on startup) but to do what I need to do, I need the Context Path - I cant seem to get this unless it is a real request from outside the server.

What I am trying to do is run through the list of jsps - and force a request on them to make them load and precompile

Any advise appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2007
Added on Apr 29 2003
8 comments
470 views