instead of writing:
<a href="/common/header.jsp">test</a>

try:
<a href="<%=request.getContextPath()%>/common/header.jsp">test</a>

When you are creating html, make sure the context path is given.  Paths in
HTML are different than paths in your java code.

-----Original Message-----
From: Jeff Prideaux [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 2:58 PM
To: tomcat user
Subject: simple context question for tomcat


In my development environment, for my "myapp" web-app, I'm doing the
following

<jsp:include page="/commmon/header.jsp" flush="true"/>

and it finds the file just fine.  header.jsp is in the common directory
under the "myapp" webapp.

Although, if I use an anchor

<a href="/common/header.jsp">test</a>

it doesn't find the file. it looks to my "root" webapp.   I must use
<a href="/myapp/common/header.jsp">test</a>

What configuration step must I do so that my anchors (and references to
images) can be addressed using the first way I tried (without having to use
/myapp/...)

I have reasons for not using relative addressing  (../common/...).

Any tips on the configuration steps (even general comments) would be greatly
appreciated.


Thanks!!!

Jeff Prideaux,



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to