Your context path can change depending on deployment. It is
best to let the HttpServletRequest extract it from the URI.
So the call to request.getContextPath() is your best bet.
tim.

> where should I place the image filesPetr Podsednik wrote:
> <img src="<%=request.getContextPath()%>/images/app-logo.gif" .....
> 
> 
> - I know that you often need your own context path in order to return a
> correct link to some resource in your web-app, but is there not a better way
> than calling request.getContextPath() ? It seems odd to me to ask for the
> context path on the request object - I am looking for something like
> 
> pageContext.getServletContext().getInitParameter("the application context
> path")
> 
> but I have not been able find out how to make this work...
> 
> 
> Any comments / suggestions would be appreciated
> 
> R.
> 


Reply via email to