cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <>
Subject Re: Bug in JSPReader?
Date Fri, 01 Aug 2003 06:10:49 GMT
Yes, that should be fixed. At the time of writing the JSPReader (and
JSPGenerater as well) there were no any means for obtaining the current
sitemap URI relative the web application context. Now there is something
like getSitemapURI that can help with it.

Please post a patch to Bugzilla if you fix this (also, please fix the

  Konstantin Piroumian

----- Original Message ----- 
From: "Marc Baumgartner" <>
To: <>
Sent: Thursday, July 31, 2003 21:39
Subject: Bug in JSPReader?

Hello all,

it seems that there is a bug in the JSPReader class?

I have the following sitemap entry:

<map:match pattern="admin/*.jsp">
  <map:read type="jsp" src="test/{1}.jsp" mime-type="text/html" />

With entering the url "localhost:8080/cocoon/admin/hello.jsp" I get a error
message that the ressource "localhost:8080/cocoon/test/admin/hello.jsp" can
not be found.

I am using tomcat 4.1.24 and have tried this with cocoon 2.04, 2.1m1-m3.

I took a look at the sourcecode of the JSPReader and there are the following

// get current request path
String servletPath = httpRequest.getServletPath();
// remove file part
servletPath = servletPath.substring(0,servletPath.lastIndexOf('/') + 1);
url = servletPath + url;

I call this URL: "localhost:8080/cocoon/admin/hello.jsp"

The variable servletPath contains "/admin/hello.jsp".
Then this path is reduced to "/admin/".
The variable url contains the path to which we are mapping:

But the final url is "/admin/test/hello.jsp"

>From my point of view the variable servletPath has to contain the path the
current subsitemap. In my case "/".

Is this maybe a bug?


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

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

View raw message