You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/06/15 20:45:10 UTC

DO NOT REPLY [Bug 39817] New: - Include File Failure for Parent|Top Relative References

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817

           Summary: Include File Failure for Parent|Top Relative References
           Product: Tomcat 5
           Version: 5.0.17
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: james.crocker@menasha.com


While using the <%@ include file="" %> a Jasper exception for file not found is
generated when the target file is in a parent|top location. (Current and
subordinate directory file references are successfull.)

jdk 1.5.0_07
tomcat 5.5.17

server.xml appBase="/topdir/webapp" docBase="" path=""

topdir -
   webapp -
      parenttarget.jsp
      dir1 -
         inc.jsp
         peertarget.jsp
         subdir -
            subtarget.jsp

      
inc.jsp eg.
<%@ include file="../parnenttarget.jsp" %> FAILS file not found for
"/../parenttarget.sjp"
<%@ include file="/parenttarget.jsp" %> FAILS file not found for "/parenttarget.sjp"
<%@ include file="peertarget.jsp" %> OK
<%@ include file="subdir/subtarget.jsp" %> OK

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817


markt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |esandusky@configureone.com




------- Additional Comments From markt@apache.org  2006-07-27 21:07 -------
*** Bug 40130 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817





------- Additional Comments From esandusky@configureone.com  2006-07-28 15:47 -------
(In reply to comment #7)
> *** Bug 40130 has been marked as a duplicate of this bug. ***

Can you please expand on how to alter the Tomcat configuration, as the online 
docs do not explain this?  Changing all of my "include file=" is not an 
option.  I find it strange how a sub-release of Tomcat (5.5.12 to 5.5.17) 
requires not only changes to Tomcat setup, but also changes to my code.

My setup is as follows:

server.xml
<host name="concept" appBase="D:\webapps\Concept"/>

ROOT.xml (under Catalina/concept folder)
<context path="" docBase=""/>

Code structure

d:\webapps\Concept\catalog (contains jsps)
d:\webapps\Concept\core (contains jsps)
d:\webapps\Concept\WEB-INF (contains compiled classes/libs)

/core/*.jsp are included properly
/catalog/*.jsp are NOT included properly

What is the difference between those 2 folders?

Tomcat Manager shows a "context" for each JSP folder (catalog, core, etc).  
Why is this changed from previous versions?



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817





------- Additional Comments From email@michaeljohnston.co.uk  2006-07-22 19:26 -------
The above approach, together with ammending the include line in
ROOT/subdir/index.jsp to

<%@ include file="../_jspf/global.jspf" %>

does indeed solve the problem.

Many thanks and apologies for the misconfiguration on my part.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817





------- Additional Comments From email@michaeljohnston.co.uk  2006-07-22 09:34 -------
Created an attachment (id=18625)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18625&action=view)
A minimal test war to demonstrate the issue

When accessing /index.jsp the HTML contained within /_jspf/global.jspf is
displayed without error. When accessing /subdir/index.jsp, which is idential to
/index.jsp, the following error is thrown:

org.apache.jasper.JasperException: /index.jsp(1,1) File "/_jspf/global.jspf"
not found

The web application "test" is running on a Virtual Host www.test.com on
localhost with the following mod_jk lines in httpd.conf

JkAutoAlias "<insertpathhere>/test"
JkMount /*.jsp ajp13w
JkMount /subdir/* ajp13w

and the following Host tag in server.xml

<Host name="test.com" appBase="<insertpathhere>/test" >
  <Alias>www.test.com</Alias>
  <Context path="" docBase="" debug="1"/>
</Host>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817


markt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From markt@apache.org  2006-07-22 18:16 -------
I can now reproduce this. Note that httpd and JK are not part of this, I
reproduced it on Tomcat standalone.

This report is invalid as it is caused by a configuration error. That it worked
in earlier versions was luck and due to how Tomcat handled dirs in the appbase.

The current behaviour is:
Any directory in an appbase gets deployed as a webapp. Therefore _jspf and
subdir get deployed as webapps (as well as the appbase itself due tot he context
with docBase=""). The relative paths don't work across contexts, hence the failure.

A possible untested workaround is to turn off autodeployment for the appbase.

The correct approach is to:
- remove the context declaration with docBase="" from server.xml
- place the root context for the host in a directory called ROOT

Further assistance on configuration is available from the online docs and the
users mailing list.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817


reachmuthukumar@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |41261
              nThis|                            |




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817





------- Additional Comments From william.barker@wilshire.com  2006-08-01 19:27 -------
*** Bug 40155 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817


email@michaeljohnston.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |




------- Additional Comments From email@michaeljohnston.co.uk  2006-07-21 17:56 -------
I have just upgraded from 5.5.7 to 5.5.17 and I immediately found a problem
similar to the one described above.

Those web applications which have include statements similar to

<%@ include file="/_jspf/global.jspf" %>

in files contained within a sub directory of the appBase throw the following
error when the page is accessed:

org.apache.jasper.JasperException: /index.jsp(2,0) File "/_jspf/global.jspf" not
found

The same line works perfectly in files contained within the appBase itself.

This has happened across the board with every one of my web applications, none
of which displayed a problem 5 minutes before, when running within Tomcat 5.5.7.

I have tried substituting the include line for the following:

<%@ include file="../_jspf/global.jspf" %>

which merely changes the error description string to the following:

org.apache.jasper.JasperException: /index.jsp(2,0) File "/../_jspf/global.jspf"
not found

I am convinced this problem in not related to a typo or other such developer
mistake due to the blanket effect on all my applications and the abscenece of
any problem during build in Netbeans IDE 5.0 which helpfully checks all include
file references on compile.

Tomcat is running as a service on my Windows XP machine, is using jre1.5.0_07,
and is connected to Apache HTTP Server 2.0.58 using the appropriate build of 
mod_jk.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817


markt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




------- Additional Comments From markt@apache.org  2006-06-18 23:27 -------
I have just tested this with the latest 5.5.x source and everything works as
expected.

I assumed the parenttarget.sjp was a typo in the bug report but could it be a
typo in your test case as well?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 39817] - Include File Failure for Parent|Top Relative References

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39817





------- Additional Comments From markt@apache.org  2006-07-21 22:38 -------
Given I cannot re-reproduce this, please attach a minimal test war that
demonstrates this issue.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org