incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harry Metske (JIRA)" <>
Subject [jira] Commented: (JSPWIKI-620) templates not copied
Date Sun, 27 Dec 2009 08:45:29 GMT


Harry Metske commented on JSPWIKI-620:

Thanks for your feedback Rolf, and yes I think too there aren't many people using this war-tomcat.
We (mainly the work of Andrew) did port this task to JSPWiki 3.0 , and was renamed to jar-compiled-jsps
(precompiling jsp's is not tomcat specific).
The main advantage is a speedup for the first user, I don't know if there are any other advantages
(maybe security ?).

I had a look at TemplateManager and my findings are that TemplateManager.findResource() uses
javax.servlet.ServletContext.getResourceAsStream("/templates/default/ViewTemplate.jsp") to
determine which template to use.
If the physical jsp's aren't there (this is the case with precomiled jsp's), it always returns
null, and we fail.

The Servlet API ( is not exactly clear in it's intended
behavior, I would expect that getResource and getResourceAsStream would take the servlet mappings
in web.xml into account, but apparently they don't.

So I see 3 options now :

1. Use something else than getResourceAsStream to find out which template to use
2. When using precompiled jsp's, als copy the source jsp's into the war
3. forget about this whole precompiling jsp's

Option 1 is the preferred one,  anyone have any suggestions on the implementation ?
Option 2 is a kludge, and will confuse people.
Option 3 is the easiest of course, but we will loose something.

Anyone wants to comment ?

> templates not copied
> --------------------
>                 Key: JSPWIKI-620
>                 URL:
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Servlet Container/Java compatibility
>    Affects Versions: 2.8.3
>         Environment: Debian linux, ant 1.7.1, tomcat 6.0.20
>            Reporter: Rolf Schumacher
> What I did:
> checked out branch 2.8.3 or downloaded source distribution from, built with
"ant war" or "ant war-tomcat", unjared to webapps location, configuration page is handled
properly, restart tomcat, entered http://localhost:8080/JSPWiki.
> What I expected:
> to see the Main.txt page
> What I got:
> a blank window
> Workaround:
> manually copied all jsp pages from webdocs/templates/default of the source distribution
to tomcat/webapps/JSPWiki/templates/default inclunding subdirectories.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message