jspc compile fails cannot resolve sitemesh URI

zambak <[email protected]>
Newsgroups gmane.comp.web.sitemesh.general
Message-ID <21208814.1112018258811.JavaMail.os-j2ee@opensymphony01.contegix.com>
> On Fri, 25 Mar 2005 13:26:18 CST, zambak
> <[email protected]> wrote:
> > Update:
> > I have resolved this issue by using a custom Ant
> task...
> 
> I'm curious how you set this up. I'm working on a new
> webapp and using
> SiteMesh as part of the implementation. I'm just
> getting to the point
> where I would like to add pre-compilation of the JSPs
> to my Ant
> buildfile. If you would share how you set it up for
> your app, I would
> appreciate it.
> 
> Thanks, Van
> 
> -- 
> - Mike "Van" Riper
>   [email protected]
>   https://sv-web-jug.dev.java.net
> 
> 
> 


Hi Mike

What I did was to invoke JspC via <java> task in ant rather than to execute the shell script provided by Sun. This way I was able to specify the libraries path and bunch of other options.

Here is what the task looks like:

[b]    <target name="compile-jsp" depends="compile" description="Compile JSP pages">
        <java classname="org.apache.jasper.JspC" fork="true">
            <arg line=" -webapp ${web.dir}" />
            <arg line=" -d ${build.dir}/generated" />
            <arg line=" -v" />
            <arg line=" -l" />
            <arg line=" -trimSpaces" />
            <arg line=" -compile" />
            <arg line=" -webxml ${build.dir}/generated/web.xml.txt" />
            <classpath refid="compile.classpath" />            
        </java>
    </target> [/b] 

The classpath is very important, so make sure you have all the necessary jars in your classpath.

Hope this helps
Z...

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=1054&messageID=3517#3517


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.