tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: Path
Date Mon, 08 Dec 2008 17:45:58 GMT

No need to edit any *.xml files. 

Your webapp already knows what it's context path is when the request
comes in.  The expression I wrote is used in jsp pages to compose server
absolute links to resources like jsps, html pages, images, javascript,
css, etc., ...  Consider it in the context of:

<a href="${pageContext.request.contextPath}/jsp/any.jsp">Click here to

If you are working with a servlet instead of a jsp, it would be
request.getContextPath() + "/jsp/any.jsp" to build links where request
is an instance of javax.servlet.http.HttpServletRequest.


coubeatczech wrote:
> David Smith-2 wrote:
>> ${pageContext.request.contextPath}/jsp/any.jsp
> and do i need set the context path anywhere in some *.xml file, or it work
> just right that as you've wrote?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message