Can anyone help explain what is going on with the Tomcat link
creation/interpretation and what we could do to get this working correctly?

Apache Tomcat Version 5.5.26
JRE_HOME:  /usr/java/jdk1.6.0_07
CATALINA_BASE: /usr/local/tomcat5
Running on Virtual Server VMWare 
within a 64bit Windows 2003 Server.

Tomcat Virtual Hosts Current Setup:

/usr/local/tomcat5/conf/server.xml
    <Engine name="Catalina" defaultHost="localhost">
      <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
      </Host>
      <Host appBase="bcosite" name="bcosite.com"
        unpackWARs="true" autoDeploy="true"
        xmlValidation="false" xmlNamespaceAware="false" > 
        <Valve className="org.apache.catalina.valves.AccessLogValve"
        directory="logs/be"  prefix="be_access_log." suffix=".txt"
        pattern="combined" resolveHosts="true"/> 
      </Host>
    </Engine>

/usr/local/tomcat5/bcosite/ROOT/META-INF/context.xml
<Context privileged="true" antiResourceLocking="false" 
        reloadable="true" antiJARLocking="false" debug="1"/>

Directory Structure contents (Only 1 Virtual Host installed so far):
        /usr/local/tomcat5/webapps/ROOT/ - default Tomcat installation files
        /usr/local/tomcat5/bcosite/ROOT/ - default.jsp & prds.jsp
        /usr/local/tomcat5/bcosite/ROOT/includes/ - header.jsp & footer.html
        /usr/local/tomcat5/bcosite/ROOT/pudire/ - pudire.jsp

Inside both the header.jsp and footer.html files the same link is included:
         /prds.jsp prds 

Both the default.jsp and pudire.jsp files include the footer.html and create
the correct link inside the web page:
        default.jsp = <%...@include file="/includes/footer.html"%> = works fine
        pudire.sjp = <%...@include file="/includes/footer.html"%> = works fine

This include statement in default.jsp works fine and creates a valid path to
the prds.jsp page:
        <%...@include file="/includes/header.jsp"%>
        The link it creates inside the web page is:
        http://bcosite.com/prds.jsp
        Correct link.

This include statement in pudire.jsp creates the wrong path to the prds.jsp
page:
        <%...@include file="/includes/header.jsp"%>
        The link it creates for the web page is:
        http://bcosite.com/pudire/prds.jsp
        Wrong link...it added the /pudire directory into the link href??


-- 
View this message in context: 
http://www.nabble.com/Tomcat-hyperlink-interpretation-when-including-jsp-file-from-another-subdirectory-tp23943241p23943241.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to