Mikolaj Rydzewski wrote:

>> sputnik wrote:
>>
>
>>>> is there a way to include JSP files which are located in a JAR?
>>>>
>>>> i.e <%@ import file=\\\"/pathToJar.jar!include.jsp\\\"%>
>>>>
>>>> afaik the jasper compiler can load taglibs out of JARs, might be that
>>>> there\\\'s already a solution to do this with JARs?
>>>>   
>
>>
>> You can precompile JSPs before deploying, you\'ll have to add servlet
>> mapping for each precompiled JSP to web.xml. There\'s ant task to do
>> the job.
>>
>> You can also try Velocity.
>>

I think this would work for standalone JSP scripts but not if just using
them as includes like

<%@ import file=\"checkLogin.jsp\" %>

or

..
<c:if test=\"${page.header=\'true\'}\">
    <jsp:import url=\"/header.jsp\"/>
<c/:if>

because (as I think) you have to have all jsp sources accessible to be
able to compile a servlet out of jsp.
according to my trace, when using <%@ import file=\"checkLogin.jsp\" %>
the jasper compiler does not
check if checkLogin_jsp.class already exists, but tries to parse the
checkLogin.jsp file.

the idea behind is to have a jar library which contains jsp fragments, which
should be able to include from a certain application the way as they were
located on file system.




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to