You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Arun <ar...@gmail.com> on 2007/10/11 14:19:42 UTC

Precompile JSPs

Hi,

I want to precompile jsps for apache tomcat 6. Which ant task should i use .
Is there a simple example for that.
I am using a build.xml exported from MyEclipse. Where would the JSP classes
go in WEB-INF/classes. What structure does it have.


-- 
Thanks
Arun George

Re: Precompile JSPs

Posted by Arun <ar...@gmail.com>.
Ok, Thanks

On 10/11/07, Pid <p...@pidster.com> wrote:
>
> Arun wrote:
> > Hi,
> >
> > I want to precompile jsps for apache tomcat 6. Which ant task should i
> use .
> > Is there a simple example for that.
> > I am using a build.xml exported from MyEclipse. Where would the JSP
> classes
> > go in WEB-INF/classes. What structure does it have.
> >
> >
>
> http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
>
> Strongly recommend familiarising yourself with the documentation, where
> the config is, how it works, etc.  Most of the information you need to
> deal with common problems can be found here.
>
>
> p
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Precompile JSPs

Posted by Phi-Long LE <ph...@cp.finances.gouv.fr>.
You can precompile jsp using
wget and jsp_precompile=true

for example I use this:

#!/usr/bin/posix/sh
for aJSP in $(find $HELIOS -name "*.jsp" | sed -e "s:$HELIOS::g") ; do
        wget http://vhpuw51:7777$aJSP?jsp_precompile=true
done

Le 11/10/2007 15:26, Pid a écrit :
> Arun wrote:
>   
>> jspc:
>>     
>
>   
>> What is wrong?
>>     
>
> You're sending me twice as many mails as you need to, for a start.
> Reply-to-all is unnecessary - just reply to the list please.
>
>
>
> The error message tells you what's wrong, on line 10.
>
>  "navigation.jsp(10,20) attribute for %>" is not properly terminated "
>
> Does the html:link tag href attribute accept scriptlets?
> Probably not.
>
> Does it accept dynamic runtime expression values?
> Check in the tld definition
>
>
> You'll likely have to use an expression language statement instead of a
> script variable, e.g.  ${pageContext.request.contextPath}
>
>
> p
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>   

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


Re: Precompile JSPs

Posted by Pid <p...@pidster.com>.
Arun wrote:
> jspc:

> What is wrong?

You're sending me twice as many mails as you need to, for a start.
Reply-to-all is unnecessary - just reply to the list please.



The error message tells you what's wrong, on line 10.

 "navigation.jsp(10,20) attribute for %>" is not properly terminated "

Does the html:link tag href attribute accept scriptlets?
Probably not.

Does it accept dynamic runtime expression values?
Check in the tld definition


You'll likely have to use an expression language statement instead of a
script variable, e.g.  ${pageContext.request.contextPath}


p


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


Re: Precompile JSPs

Posted by Pid <p...@pidster.com>.
Arun wrote:
> Ok, I fixed that up and I have an error coming from the ant script  that I
> copied from tomcat docs. The error said, there is no such directory called
> /usr/local/bin/apache-tomcat-6.0.13/common/lib.

Correct, Tomcat 6 uses doesn't use 3 different directories (common,
server, shared) for libraries, it uses just one (lib).

> There is no folder called common/lib in my tomcat 6 home directory.
> When I commented that line from the script,  ant told me that it cannot
> find HttpJspBase class. I checked docjar.com and found that the jar file was
> jasper-runtime.jar.

That's because it needs to know where the lib directory, and the files
are.  Simply commenting the line out will not fix the problem.

Change the "common/lib" to "lib", or follow the instructions below.

> Obviously this would have been in common/lib. I downloaded my tomcat 6 from
> apache website. Why is there no jasper runtime.?

There is, you may even have found the files if you get around to looking
at your Tomcat installation.  As before, I recommend you familiarise
yourself with the documentation and also the files that make up your
Tomcat installation.

Look in the TOMCAT/bin directory, there you will find some useful files,
catalina-tasks.xml is one such that contains the Ant task definitions.
You can import that into your Ant script (see below) and it should have
the correct settings for your version of Tomcat.

  <import file="${tomcat.home}/bin/catalina-tasks.xml"/>


(You may also wish to advance your knowledge by investigating what the
others do, too).


p



> On 10/11/07, David Smith <dn...@cornell.edu> wrote:
>> Why are you mixing el expressions with <%= ... %> expressions?  I'd
>> replace <%=request.getContextPath()%> with ${request.contextPath}.
>>
>> --David
>>
>> Arun wrote:
>>
>>> jspc:
>>>
>>> BUILD FAILED
>>> /home/build/mobchannel/mobchannelWEB/build.xml:199:
>>> org.apache.jasper.JasperException:
>>> file:/home/build/mobchannel/mobchannelWEB/WebRoot/jsp/toolbox/navigation.jsp(10,20)
>>> attribute for %>" is not properly terminated
>>>
>>> I got this error on using the jspc task.
>>> I have copied the from the tomcat docs sited above.
>>>
>>> My navigation.jsp looks like
>>>
>>> <%@page pageEncoding="UTF-8"%>
>>> <%@page language="java" contentType="text/html;charset=UTF-8" %>
>>> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
>>> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
>>> <%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c"%>
>>> <%@ taglib uri="/WEB-INF/fmt-rt.tld" prefix="fmt"%>
>>> <fmt:setLocale value="${locale}" />
>>> <fmt:bundle basename="toolbox">
>>> <div id="fullwidthTable" class="style_fullCentreMenucolor" >
>>> <html:link href="<%=request.getContextPath
>> ()%>/toolbox/toolboxflow.do?dispatch=quickmessage"><b>‍<fmt:message
>>> key="toolbox.menu.quickmessage"/></b>&nbsp | </html:link>
>>> <html:link href="<%=request.getContextPath
>> ()%>/toolbox/toolboxflow.do?dispatch=sendcard"><b><fmt:message
>>> key="toolbox.menu.sendcard" />‌</b>&nbsp |</html:link>
>>> <html:link href="<%=request.getContextPath
>> ()%>/toolbox/toolboxflow.do?dispatch=today"><b><fmt:message
>>> key="toolbox.menu.today" /></b>&nbsp |</html:link>
>>> <html:link href="<%=request.getContextPath
>> ()%>/toolbox/toolboxflow.do?dispatch=lipi"><b><fmt:message
>>> key="toolbox.menu.lipi"/></b>‍&nbsp |</html:link>
>>> </div>
>>> </fmt:bundle>
>>>
>>> What is wrong?
>>>
>>>
>>> On 10/11/07, Pid <p...@pidster.com> wrote:
>>>
>>>
>>>> Arun wrote:
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I want to precompile jsps for apache tomcat 6. Which ant task should i
>>>>>
>>>>>
>>>> use .
>>>>
>>>>
>>>>> Is there a simple example for that.
>>>>> I am using a build.xml exported from MyEclipse. Where would the JSP
>>>>>
>>>>>
>>>> classes
>>>>
>>>>
>>>>> go in WEB-INF/classes. What structure does it have.
>>>>>
>>>>>
>>>>>
>>>>>
>>>> http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
>>>>
>>>> Strongly recommend familiarising yourself with the documentation, where
>>>> the config is, how it works, etc.  Most of the information you need to
>>>> deal with common problems can be found here.
>>>>
>>>>
>>>> p
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 
> 


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


Re: Precompile JSPs

Posted by Arun <ar...@gmail.com>.
The build output I got after fixing, if that helps.

jspc:

precompile-jsps:
    [javac] Compiling 370 source files to
/home/build/mobchannel/mobchannelWEB/WebRoot/WEB-INF/classes
    [javac]
/home/build/mobchannel/mobchannelWEB/WebRoot/WEB-INF/src/org/apache/jsp/home_jsp.java:7:
package org.apache.jasper.runtime does not exist
    [javac] public final class home_jsp extends
org.apache.jasper.runtime.HttpJspBase
    [javac]                                                              ^
    [javac]
/home/build/mobchannel/mobchannelWEB/WebRoot/WEB-INF/src/org/apache/jsp/home_jsp.java:8:
package org.apache.jasper.runtime does not exist



On 10/11/07, Arun <ar...@gmail.com> wrote:
>
> Ok, I fixed that up and I have an error coming from the ant script  that I
> copied from tomcat docs. The error said, there is no such directory called
> /usr/local/bin/apache-tomcat-6.0.13/common/lib.
> There is no folder called common/lib in my tomcat 6 home directory.
> When I commented that line from the script,  ant told me that it cannot
> find HttpJspBase class. I checked docjar.com and found that the jar file
> was jasper-runtime.jar.
> Obviously this would have been in common/lib. I downloaded my tomcat 6
> from apache website. Why is there no jasper runtime.?
>
>
> On 10/11/07, David Smith <dn...@cornell.edu> wrote:
> >
> > Why are you mixing el expressions with <%= ... %> expressions?  I'd
> > replace <%=request.getContextPath ()%> with ${request.contextPath}.
> >
> > --David
> >
> > Arun wrote:
> >
> > >jspc:
> > >
> > >BUILD FAILED
> > >/home/build/mobchannel/mobchannelWEB/build.xml:199:
> > >org.apache.jasper.JasperException:
> > >file:/home/build/mobchannel/mobchannelWEB/WebRoot/jsp/toolbox/navigation.jsp(10,20)
> >
> > >attribute for %>" is not properly terminated
> > >
> > >I got this error on using the jspc task.
> > >I have copied the from the tomcat docs sited above.
> > >
> > >My navigation.jsp looks like
> > >
> > ><%@page pageEncoding="UTF-8"%>
> > ><%@page language="java" contentType="text/html;charset=UTF-8" %>
> > ><%@ taglib uri=" http://struts.apache.org/tags-tiles" prefix="tiles"%>
> > ><%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
> > ><%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c"%>
> > ><%@ taglib uri="/WEB-INF/fmt-rt.tld" prefix="fmt"%>
> > ><fmt:setLocale value="${locale}" />
> > ><fmt:bundle basename="toolbox">
> > ><div id="fullwidthTable" class="style_fullCentreMenucolor" >
> > ><html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=quickmessage"><b>‍<fmt:message
> >
> > >key="toolbox.menu.quickmessage"/></b>&nbsp | </html:link>
> > ><html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=sendcard"><b><fmt:message
> >
> > >key="toolbox.menu.sendcard" />‌</b>&nbsp |</html:link>
> > ><html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=today"><b><fmt:message
> >
> > >key="toolbox.menu.today" /></b>&nbsp |</html:link>
> > ><html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=lipi"><b><fmt:message
> >
> > >key="toolbox.menu.lipi"/></b>‍&nbsp |</html:link>
> > ></div>
> > ></fmt:bundle>
> > >
> > >What is wrong?
> > >
> > >
> > >On 10/11/07, Pid < p@pidster.com> wrote:
> > >
> > >
> > >>Arun wrote:
> > >>
> > >>
> > >>>Hi,
> > >>>
> > >>>I want to precompile jsps for apache tomcat 6. Which ant task should
> > i
> > >>>
> > >>>
> > >>use .
> > >>
> > >>
> > >>>Is there a simple example for that.
> > >>>I am using a build.xml exported from MyEclipse. Where would the JSP
> > >>>
> > >>>
> > >>classes
> > >>
> > >>
> > >>>go in WEB-INF/classes. What structure does it have.
> > >>>
> > >>>
> > >>>
> > >>>
> > >> http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
> > >>
> > >>Strongly recommend familiarising yourself with the documentation,
> > where
> > >>the config is, how it works, etc.  Most of the information you need to
> >
> > >>deal with common problems can be found here.
> > >>
> > >>
> > >>p
> > >>
> > >>
> > >>
> > >>---------------------------------------------------------------------
> > >>To start a new topic, e-mail: users@tomcat.apache.org
> > >>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > >>For additional commands, e-mail: users-help@tomcat.apache.org
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> --
> Thanks
> Arun George




-- 
Thanks
Arun George

Re: Precompile JSPs

Posted by Arun <ar...@gmail.com>.
Ok, I fixed that up and I have an error coming from the ant script  that I
copied from tomcat docs. The error said, there is no such directory called
/usr/local/bin/apache-tomcat-6.0.13/common/lib.
There is no folder called common/lib in my tomcat 6 home directory.
When I commented that line from the script,  ant told me that it cannot
find HttpJspBase class. I checked docjar.com and found that the jar file was
jasper-runtime.jar.
Obviously this would have been in common/lib. I downloaded my tomcat 6 from
apache website. Why is there no jasper runtime.?


On 10/11/07, David Smith <dn...@cornell.edu> wrote:
>
> Why are you mixing el expressions with <%= ... %> expressions?  I'd
> replace <%=request.getContextPath()%> with ${request.contextPath}.
>
> --David
>
> Arun wrote:
>
> >jspc:
> >
> >BUILD FAILED
> >/home/build/mobchannel/mobchannelWEB/build.xml:199:
> >org.apache.jasper.JasperException:
>
> >file:/home/build/mobchannel/mobchannelWEB/WebRoot/jsp/toolbox/navigation.jsp(10,20)
> >attribute for %>" is not properly terminated
> >
> >I got this error on using the jspc task.
> >I have copied the from the tomcat docs sited above.
> >
> >My navigation.jsp looks like
> >
> ><%@page pageEncoding="UTF-8"%>
> ><%@page language="java" contentType="text/html;charset=UTF-8" %>
> ><%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
> ><%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
> ><%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c"%>
> ><%@ taglib uri="/WEB-INF/fmt-rt.tld" prefix="fmt"%>
> ><fmt:setLocale value="${locale}" />
> ><fmt:bundle basename="toolbox">
> ><div id="fullwidthTable" class="style_fullCentreMenucolor" >
> ><html:link href="<%=request.getContextPath
> ()%>/toolbox/toolboxflow.do?dispatch=quickmessage"><b>‍<fmt:message
> >key="toolbox.menu.quickmessage"/></b>&nbsp | </html:link>
> ><html:link href="<%=request.getContextPath
> ()%>/toolbox/toolboxflow.do?dispatch=sendcard"><b><fmt:message
> >key="toolbox.menu.sendcard" />‌</b>&nbsp |</html:link>
> ><html:link href="<%=request.getContextPath
> ()%>/toolbox/toolboxflow.do?dispatch=today"><b><fmt:message
> >key="toolbox.menu.today" /></b>&nbsp |</html:link>
> ><html:link href="<%=request.getContextPath
> ()%>/toolbox/toolboxflow.do?dispatch=lipi"><b><fmt:message
> >key="toolbox.menu.lipi"/></b>‍&nbsp |</html:link>
> ></div>
> ></fmt:bundle>
> >
> >What is wrong?
> >
> >
> >On 10/11/07, Pid <p...@pidster.com> wrote:
> >
> >
> >>Arun wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>I want to precompile jsps for apache tomcat 6. Which ant task should i
> >>>
> >>>
> >>use .
> >>
> >>
> >>>Is there a simple example for that.
> >>>I am using a build.xml exported from MyEclipse. Where would the JSP
> >>>
> >>>
> >>classes
> >>
> >>
> >>>go in WEB-INF/classes. What structure does it have.
> >>>
> >>>
> >>>
> >>>
> >>http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
> >>
> >>Strongly recommend familiarising yourself with the documentation, where
> >>the config is, how it works, etc.  Most of the information you need to
> >>deal with common problems can be found here.
> >>
> >>
> >>p
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To start a new topic, e-mail: users@tomcat.apache.org
> >>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Precompile JSPs

Posted by Arun <ar...@gmail.com>.
David,
My webapp runs and works correctly. I just want to precompile jsps to
increase initial performance. Is there anyway for Jasper to skip these
errors, and continue compilation.


On 10/11/07, David Smith <dn...@cornell.edu> wrote:
>
> Why are you mixing el expressions with <%= ... %> expressions?  I'd
> replace <%=request.getContextPath()%> with ${request.contextPath}.
>
> --David
>
> Arun wrote:
>
> >jspc:
> >
> >BUILD FAILED
> >/home/build/mobchannel/mobchannelWEB/build.xml:199:
> >org.apache.jasper.JasperException:
>
> >file:/home/build/mobchannel/mobchannelWEB/WebRoot/jsp/toolbox/navigation.jsp(10,20)
> >attribute for %>" is not properly terminated
> >
> >I got this error on using the jspc task.
> >I have copied the from the tomcat docs sited above.
> >
> >My navigation.jsp looks like
> >
> ><%@page pageEncoding="UTF-8"%>
> ><%@page language="java" contentType="text/html;charset=UTF-8" %>
> ><%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
> ><%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
> ><%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c"%>
> ><%@ taglib uri="/WEB-INF/fmt-rt.tld" prefix="fmt"%>
> ><fmt:setLocale value="${locale}" />
> ><fmt:bundle basename="toolbox">
> ><div id="fullwidthTable" class="style_fullCentreMenucolor" >
> ><html:link href="<%=request.getContextPath
> ()%>/toolbox/toolboxflow.do?dispatch=quickmessage"><b>‍<fmt:message
> >key="toolbox.menu.quickmessage"/></b>&nbsp | </html:link>
> ><html:link href="<%=request.getContextPath
> ()%>/toolbox/toolboxflow.do?dispatch=sendcard"><b><fmt:message
> >key="toolbox.menu.sendcard" />‌</b>&nbsp |</html:link>
> ><html:link href="<%=request.getContextPath
> ()%>/toolbox/toolboxflow.do?dispatch=today"><b><fmt:message
> >key="toolbox.menu.today" /></b>&nbsp |</html:link>
> ><html:link href="<%=request.getContextPath
> ()%>/toolbox/toolboxflow.do?dispatch=lipi"><b><fmt:message
> >key="toolbox.menu.lipi"/></b>‍&nbsp |</html:link>
> ></div>
> ></fmt:bundle>
> >
> >What is wrong?
> >
> >
> >On 10/11/07, Pid <p...@pidster.com> wrote:
> >
> >
> >>Arun wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>I want to precompile jsps for apache tomcat 6. Which ant task should i
> >>>
> >>>
> >>use .
> >>
> >>
> >>>Is there a simple example for that.
> >>>I am using a build.xml exported from MyEclipse. Where would the JSP
> >>>
> >>>
> >>classes
> >>
> >>
> >>>go in WEB-INF/classes. What structure does it have.
> >>>
> >>>
> >>>
> >>>
> >>http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
> >>
> >>Strongly recommend familiarising yourself with the documentation, where
> >>the config is, how it works, etc.  Most of the information you need to
> >>deal with common problems can be found here.
> >>
> >>
> >>p
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To start a new topic, e-mail: users@tomcat.apache.org
> >>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Precompile JSPs

Posted by David Smith <dn...@cornell.edu>.
Why are you mixing el expressions with <%= ... %> expressions?  I'd 
replace <%=request.getContextPath()%> with ${request.contextPath}.

--David

Arun wrote:

>jspc:
>
>BUILD FAILED
>/home/build/mobchannel/mobchannelWEB/build.xml:199:
>org.apache.jasper.JasperException:
>file:/home/build/mobchannel/mobchannelWEB/WebRoot/jsp/toolbox/navigation.jsp(10,20)
>attribute for %>" is not properly terminated
>
>I got this error on using the jspc task.
>I have copied the from the tomcat docs sited above.
>
>My navigation.jsp looks like
>
><%@page pageEncoding="UTF-8"%>
><%@page language="java" contentType="text/html;charset=UTF-8" %>
><%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
><%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
><%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c"%>
><%@ taglib uri="/WEB-INF/fmt-rt.tld" prefix="fmt"%>
><fmt:setLocale value="${locale}" />
><fmt:bundle basename="toolbox">
><div id="fullwidthTable" class="style_fullCentreMenucolor" >
><html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=quickmessage"><b>‍<fmt:message
>key="toolbox.menu.quickmessage"/></b>&nbsp | </html:link>
><html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=sendcard"><b><fmt:message
>key="toolbox.menu.sendcard" />‌</b>&nbsp |</html:link>
><html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=today"><b><fmt:message
>key="toolbox.menu.today" /></b>&nbsp |</html:link>
><html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=lipi"><b><fmt:message
>key="toolbox.menu.lipi"/></b>‍&nbsp |</html:link>
></div>
></fmt:bundle>
>
>What is wrong?
>
>
>On 10/11/07, Pid <p...@pidster.com> wrote:
>  
>
>>Arun wrote:
>>    
>>
>>>Hi,
>>>
>>>I want to precompile jsps for apache tomcat 6. Which ant task should i
>>>      
>>>
>>use .
>>    
>>
>>>Is there a simple example for that.
>>>I am using a build.xml exported from MyEclipse. Where would the JSP
>>>      
>>>
>>classes
>>    
>>
>>>go in WEB-INF/classes. What structure does it have.
>>>
>>>
>>>      
>>>
>>http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
>>
>>Strongly recommend familiarising yourself with the documentation, where
>>the config is, how it works, etc.  Most of the information you need to
>>deal with common problems can be found here.
>>
>>
>>p
>>
>>
>>
>>---------------------------------------------------------------------
>>To start a new topic, e-mail: users@tomcat.apache.org
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>    
>>
>
>
>  
>


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


Re: Precompile JSPs

Posted by Arun <ar...@gmail.com>.
jspc:

BUILD FAILED
/home/build/mobchannel/mobchannelWEB/build.xml:199:
org.apache.jasper.JasperException:
file:/home/build/mobchannel/mobchannelWEB/WebRoot/jsp/toolbox/navigation.jsp(10,20)
attribute for %>" is not properly terminated

I got this error on using the jspc task.
I have copied the from the tomcat docs sited above.

My navigation.jsp looks like

<%@page pageEncoding="UTF-8"%>
<%@page language="java" contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/fmt-rt.tld" prefix="fmt"%>
<fmt:setLocale value="${locale}" />
<fmt:bundle basename="toolbox">
<div id="fullwidthTable" class="style_fullCentreMenucolor" >
<html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=quickmessage"><b>‍<fmt:message
key="toolbox.menu.quickmessage"/></b>&nbsp | </html:link>
<html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=sendcard"><b><fmt:message
key="toolbox.menu.sendcard" />‌</b>&nbsp |</html:link>
<html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=today"><b><fmt:message
key="toolbox.menu.today" /></b>&nbsp |</html:link>
<html:link href="<%=request.getContextPath()%>/toolbox/toolboxflow.do?dispatch=lipi"><b><fmt:message
key="toolbox.menu.lipi"/></b>‍&nbsp |</html:link>
</div>
</fmt:bundle>

What is wrong?


On 10/11/07, Pid <p...@pidster.com> wrote:
>
> Arun wrote:
> > Hi,
> >
> > I want to precompile jsps for apache tomcat 6. Which ant task should i
> use .
> > Is there a simple example for that.
> > I am using a build.xml exported from MyEclipse. Where would the JSP
> classes
> > go in WEB-INF/classes. What structure does it have.
> >
> >
>
> http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html
>
> Strongly recommend familiarising yourself with the documentation, where
> the config is, how it works, etc.  Most of the information you need to
> deal with common problems can be found here.
>
>
> p
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Precompile JSPs

Posted by Pid <p...@pidster.com>.
Arun wrote:
> Hi,
> 
> I want to precompile jsps for apache tomcat 6. Which ant task should i use .
> Is there a simple example for that.
> I am using a build.xml exported from MyEclipse. Where would the JSP classes
> go in WEB-INF/classes. What structure does it have.
> 
> 

http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html

Strongly recommend familiarising yourself with the documentation, where
the config is, how it works, etc.  Most of the information you need to
deal with common problems can be found here.


p



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


Re: Precompile JSPs

Posted by Arun <ar...@gmail.com>.
Classpath with ant has always been sticky.
This is what I compiled from the docs.

<property environment="env" />

 <property name="tomcat.home" value="${env.CATALINA_HOME}" />
 <property name="webapp.path" value="WebRoot" />

 <import file="${tomcat.home}/bin/catalina-tasks.xml" />

 <target name="jspc">
  <jasper validateXml="false" uriroot="${webapp.path}" webXmlFragment="${
webapp.path}/WEB-INF/generated_web.xml" outputDir="${webapp.path}/WEB-INF/src"
/>
  <mkdir dir="${webapp.path}/WEB-INF/classes" />
  <mkdir dir="${webapp.path}/WEB-INF/lib" />
  <javac destdir="${webapp.path}/WEB-INF/classes" optimize="off" source="1.5"
target="1.5" debug="on" failonerror="false" srcdir="${webapp.path}/WEB-INF/src"
excludes="**/*.smap">
   <classpath>
    <pathelement location="${webapp.path}/WEB-INF/classes" />
    <path refid="mobchannelWEB.classpath" />
    <fileset dir="${webapp.path}/WEB-INF/lib">
     <include name="*.jar" />
    </fileset>
    <pathelement location="${tomcat.home}/lib" />

    <fileset dir="${tomcat.home}/bin">
     <include name="*.jar" />
    </fileset>
   </classpath>
   <include name="**" />
   <exclude name="tags/**" />
  </javac>
 </target>
My CATALINA_HOME enviroment variable points correctly .
I had done an echo ${CATALINA_HOME} and it worked. I had  been trying on the
same script for so long.





On 10/11/07, Pid <p...@pidster.com> wrote:
>
> Arun wrote:
> > Filip,
> >
> > That works cool.
> > Thank you for the reply.
> >
> > I do not know why the one specified in tomcat docs does not work. All I
> know
> > is that it throws an error telling me that it cant find
> > org.apache.jasper.runtime package. But that is there in the lib
> directory of
> > tomcat's home in jasper.jar. All I know is that the ant script is not
> > picking up my jasper.jar. I have correctly included the
> > catalina-tasks.xmlas well.
>
> It does work, you just need to adjust the path to a Tomcat6 applicable
> one.  See my previous mail.
>
> > I compared with yours , all I found is that the one in doc uses a
> default
> > jasper task, And you used your own(jasper2). But the Jasper shown on
> tomcat
> > docs works correctly though , but the javac fails.
> >
> >
> >
> >
> >
> >
> >
> > On 10/11/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> >> here is a script that precompiles just like Tomcat runtime, meaning,
> you
> >> still keep the ability to reload your JSPs instead of converting them
> to
> >> servlets
> >> http://people.apache.org/~fhanik/tomcat-6-precompile.xml
> >>
> >> Filip
> >>
> >> Arun wrote:
> >>> Hi,
> >>>
> >>> I want to precompile jsps for apache tomcat 6. Which ant task should i
> >> use .
> >>> Is there a simple example for that.
> >>> I am using a build.xml exported from MyEclipse. Where would the JSP
> >> classes
> >>> go in WEB-INF/classes. What structure does it have.
> >>>
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------
> >>>
> >>> No virus found in this incoming message.
> >>> Checked by AVG Free Edition.
> >>> Version: 7.5.488 / Virus Database: 269.14.7/1062 - Release Date:
> >> 10/10/2007 5:11 PM
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Precompile JSPs

Posted by Pid <p...@pidster.com>.
Arun wrote:
> Filip,
> 
> That works cool.
> Thank you for the reply.
> 
> I do not know why the one specified in tomcat docs does not work. All I know
> is that it throws an error telling me that it cant find
> org.apache.jasper.runtime package. But that is there in the lib directory of
> tomcat's home in jasper.jar. All I know is that the ant script is not
> picking up my jasper.jar. I have correctly included the
> catalina-tasks.xmlas well.

It does work, you just need to adjust the path to a Tomcat6 applicable
one.  See my previous mail.

> I compared with yours , all I found is that the one in doc uses a default
> jasper task, And you used your own(jasper2). But the Jasper shown on tomcat
> docs works correctly though , but the javac fails.
> 
> 
> 
> 
> 
> 
> 
> On 10/11/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>> here is a script that precompiles just like Tomcat runtime, meaning, you
>> still keep the ability to reload your JSPs instead of converting them to
>> servlets
>> http://people.apache.org/~fhanik/tomcat-6-precompile.xml
>>
>> Filip
>>
>> Arun wrote:
>>> Hi,
>>>
>>> I want to precompile jsps for apache tomcat 6. Which ant task should i
>> use .
>>> Is there a simple example for that.
>>> I am using a build.xml exported from MyEclipse. Where would the JSP
>> classes
>>> go in WEB-INF/classes. What structure does it have.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG Free Edition.
>>> Version: 7.5.488 / Virus Database: 269.14.7/1062 - Release Date:
>> 10/10/2007 5:11 PM
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 
> 


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


Re: Precompile JSPs

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
yes, it was a long time ago since I looked into the other way of doing 
it. Since compiling JSPs into servlets defeats the purpose of reloadable 
JSPs

Filip

Arun wrote:
> Filip,
>
> That works cool.
> Thank you for the reply.
>
> I do not know why the one specified in tomcat docs does not work. All I know
> is that it throws an error telling me that it cant find
> org.apache.jasper.runtime package. But that is there in the lib directory of
> tomcat's home in jasper.jar. All I know is that the ant script is not
> picking up my jasper.jar. I have correctly included the
> catalina-tasks.xmlas well.
>
> I compared with yours , all I found is that the one in doc uses a default
> jasper task, And you used your own(jasper2). But the Jasper shown on tomcat
> docs works correctly though , but the javac fails.
>
>
>
>
>
>
>
> On 10/11/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>   
>> here is a script that precompiles just like Tomcat runtime, meaning, you
>> still keep the ability to reload your JSPs instead of converting them to
>> servlets
>> http://people.apache.org/~fhanik/tomcat-6-precompile.xml
>>
>> Filip
>>
>> Arun wrote:
>>     
>>> Hi,
>>>
>>> I want to precompile jsps for apache tomcat 6. Which ant task should i
>>>       
>> use .
>>     
>>> Is there a simple example for that.
>>> I am using a build.xml exported from MyEclipse. Where would the JSP
>>>       
>> classes
>>     
>>> go in WEB-INF/classes. What structure does it have.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG Free Edition.
>>> Version: 7.5.488 / Virus Database: 269.14.7/1062 - Release Date:
>>>       
>> 10/10/2007 5:11 PM
>>     
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.488 / Virus Database: 269.14.7/1062 - Release Date: 10/10/2007 5:11 PM
>   


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


Re: Precompile JSPs

Posted by Arun <ar...@gmail.com>.
Filip,

That works cool.
Thank you for the reply.

I do not know why the one specified in tomcat docs does not work. All I know
is that it throws an error telling me that it cant find
org.apache.jasper.runtime package. But that is there in the lib directory of
tomcat's home in jasper.jar. All I know is that the ant script is not
picking up my jasper.jar. I have correctly included the
catalina-tasks.xmlas well.

I compared with yours , all I found is that the one in doc uses a default
jasper task, And you used your own(jasper2). But the Jasper shown on tomcat
docs works correctly though , but the javac fails.







On 10/11/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>
> here is a script that precompiles just like Tomcat runtime, meaning, you
> still keep the ability to reload your JSPs instead of converting them to
> servlets
> http://people.apache.org/~fhanik/tomcat-6-precompile.xml
>
> Filip
>
> Arun wrote:
> > Hi,
> >
> > I want to precompile jsps for apache tomcat 6. Which ant task should i
> use .
> > Is there a simple example for that.
> > I am using a build.xml exported from MyEclipse. Where would the JSP
> classes
> > go in WEB-INF/classes. What structure does it have.
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.488 / Virus Database: 269.14.7/1062 - Release Date:
> 10/10/2007 5:11 PM
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks
Arun George

Re: Precompile JSPs

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
here is a script that precompiles just like Tomcat runtime, meaning, you 
still keep the ability to reload your JSPs instead of converting them to 
servlets
http://people.apache.org/~fhanik/tomcat-6-precompile.xml

Filip

Arun wrote:
> Hi,
>
> I want to precompile jsps for apache tomcat 6. Which ant task should i use .
> Is there a simple example for that.
> I am using a build.xml exported from MyEclipse. Where would the JSP classes
> go in WEB-INF/classes. What structure does it have.
>
>
>   
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.488 / Virus Database: 269.14.7/1062 - Release Date: 10/10/2007 5:11 PM
>   


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