You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Yair Zadik <ya...@disappearing.com> on 2001/03/20 23:44:13 UTC
Using Jikes instead of JavaC with Tomcat/Jasper
I've been trying to get Tomcat to use Jikes instead of javac
as its Java compiler for JSP pages. All the information I've
found says to edit the conf/web.xml file. As far as I could
tell, this did nothing, so I poked around the sources.
According to 'WebXmlReader.java' (in 3.2.1):
// We may read a "default" web.xml from INSTALL/conf/web.xml -
// the code is commented out right now because we want to
// consolidate the config in server.xml ( or API calls ),
// we may put it back for 3.2 if needed.
// note that web.xml have to be cleaned up - only diff from
// default should be inside
// readDefaultWebXml( ctx );
so it appears that conf/web.xml is no longer read. However,
adding
<servlet>
<servlet-name>
jsp
</servlet-name>
<servlet-class>
org.apache.jasper.servlet.JspServlet
</servlet-class>
<init-param>
<param-name>jspCompilerPlugin</param-name>
<param-value>org.apache.jasper.orgpiler.JikesJavaCompiler</param-value>
</init-param>
<load-on-startup>
-2147483646
</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>
jsp
</servlet-name>
<url-pattern>
*.jsp
</url-pattern>
</servlet-mapping>
(basically, the jsp servlet definition and mapping from conf/web.xml) into
my webapp's 'web.xml' file seems to do the trick.
Is there a way of doing this now without altering my webapp? I'd like to
make this mapping the default rather then the standard JavaC mapping. Does
this require writing a WebXmlReader replacement?
Yair