This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Servlets and the fly likes Getting the context path NOT from the request Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Getting the context path NOT from the request" Watch "Getting the context path NOT from the request" New topic
Author

Getting the context path NOT from the request

Michael Remijan
Ranch Hand

Joined: May 29, 2002
Posts: 103

there is the method HttpServletRequest.getContextPath() It seems to me this data should be available from somewhere other than the request object. I'd really like to get it out of the ServletContext in my implementation of the ServletContextListener but I don't see it. How else can you get this data?


<a href="http://www.linkedin.com/in/mjremijan" rel="nofollow">
<img src="http://www.linkedin.com/img/webpromo/btn_viewmy_160x25.png" border="0" >
</a>
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

http://www.coderanch.com/t/361361/Servlets/java/webapp-name-configured-Tomcat


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Getting the context path NOT from the request
 
Similar Threads
CGI Env Variable
bookmarking pages
findByPrimaryKey() method in Entity Bean
How to pass cookies in java spring
Need to invoke SOAP msg with standalone java class