You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Szegedi, Attila" <sz...@scriptum.hu> on 2001/03/30 09:32:30 UTC

RE: Running Tomcat without tools.jar (javac) after precompiling my jsp's.

You should run jspc with -webinc switch. It will generate an XML fragment
that you should add to your web.xml file (either by copy/paste or by
including it as an entity); It will look like this:

<servlet>
	<servlet-name>com.mycompany.foo.myjsppage</servlet-name>
	<servlet-class>com.mycompany.foo.myjsppage</servlet-class>
</servlet>
<servlet-mapping>
	<url-pattern>/com/mycompany/foo/myjsppage.jsp</url-pattern>
	<servlet-name>hu.scriptum.rolemgr.addrole</servlet-name>
</servlet-mapping>

If you don't like the default URL patterns, change them to what you like. I
invoke jspc through Ant, so a <replace> task after jspc-invoking <java> task
does the job.

One thing to watch for is that the compiled classes depend on the
org.apache.jasper.runtime package, so your webapp will either be tied to
Tomcat, or you should distribute org.apache.jasper.runtime package (found in
jasper.jar) with your webapp.

Also please note that questions regarding Tomcat usage should go to
tomcat-user list instead.

Attila.