pageContext.getServletContext().getContextPath()

On Wed, 11 Apr 2001, Johan Fredriksson wrote:

> I'm using virtual hosts in my development to make sure that all links are correctly 
>set, that is I can access the same app in two ways, either via
> 
> appname.localhost
> 
> or
> 
> localhost/appname
> 
> .
> 
> The problem is that I'm not sure how to figure out on a jsp page which entry point 
>was used, and this causes problem when I'm trying to map my servlet, since relative 
>paths to servlets does not seem to work...
> 
> String parsing of request.getRequestURI() seems like a way to start, but I'm not 
>sure what how to write it, since in the future the app might be moved again to
> 
> appname.serviceprovider.localhost
> 
> vs
> 
> localhost/serviceprovider/appname
> 
> .
> 
> Is there a way to get pageContext return application context?
> 
> 
> 
> Johan
> 


Reply via email to