tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: adding a global URI prefix for Tomcat web apps
Date Tue, 17 Apr 2012 20:49:07 GMT
2012/4/18 ron.vandenbranden@home <ron.vandenbranden@kantl.be>:
> Hi Konstantin,
>
> Many thanks for your excellent suggestion. Sorry, I forgot to mention that
> I'm running Tomcat-7.0.27, so that should work.
>
>
> On 17/04/2012 17:27, Konstantin Kolinko wrote:
>>
>> I would not comment on the Apache HTTP server configuration. Just on
>> the quoted part above. You have not told us what Tomcat version you
>> are using, but in current Tomcat 6 and 7 you can add "apps#" prefix to
>> the subdirectory and war file names in webapps directory and it will
>> add "apps/" to their URL, e.g.:
>>
>>  mv  webapps/my_app  webapps/apps#my_app
>>
>> A war file name would be "apps#my_app.war" See "Context" page in
>> "Configuration Reference Guide" for more details.
>>
>
> Nice! In my tests this works for some web apps, but apparently, some (using
> cocoon-2.1.11) have problems. Any request for cococoon-2.1.11-based web apps
> return errors about files that are not found. For example, suppose my app is
> located at F:\tomcat\webapps\apps#my_app, requests for
> http://localhost:8080/apps/my_app/ return errors such as:
>
>    Message: F:\tomcat\webapps\stylesheets\system\exception2html.xslt (The
> system cannot find the path specified)
>    Description: org.apache.cocoon.ProcessingException: Unable to get
> transformer handler for
> file:///F:/tomcat/webapps/stylesheets/system/exception2html.xslt
> at<map:serialize>  -
> file:///F:/tomcat/webapps/apps#my_app/sitemap.xmap:922:53 at<map:transform>
>  - file:///F:/tomcat/webapps/apps#my_app/sitemap.xmap:917:79 at<map:generate
> type="exception">  -
> file:///F:/tomcat/webapps/apps#my_app/sitemap.xmap:916:51
>    Sender: org.apache.cocoon.servlet.CocoonServlet
>    Source: Cocoon Servlet
>    cause
>      java.io.FileNotFoundException:
> F:\tomcat\webapps\stylesheets\system\exception2html.xslt (The system cannot
> find the path specified)
>
> Does this imply that this 'hash' prefix is still experimental, depending on
> the web app?


No. It is Cocoon that is broken.

There is File -> URL conversion somewhere that does not encode
characters properly, and '#' should be %-encoded if it is in an URL.

Last time it was discussed on this list was several years ago. Either
it is a rare use case, or it is just already fixed.

http://tomcat.markmail.org/thread/5ixxlkiyfsou63vh
http://tomcat.markmail.org/thread/ygac3etewhtpmf2p
http://tomcat.markmail.org/message/oolap6mmrs22f5wr


Best regards,
Konstantin Kolinko

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


Mime
View raw message