geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Łukasz Budnik" <>
Subject pre-compiled JSPs throw exceptions
Date Fri, 04 Apr 2008 10:04:21 GMT
Hi All!

I'm trying to run a web application that has pre-compiled JSP pages.

I'm doing so because Geronimo's on the fly JSP compilation takes ages
compared to building and deploying whole JEE application from the
scratch :(

For example a JSP page (with JSF: MyFaces + Tomahawk + Tomahawk
Sandbox) takes up to 15-20 seconds to compile!

You must admit that this is insane...

I've integrated Jasper's JSPC tool with my Ant project to pre-compile
JSP to servlets and later on to compile generated servlets classes to
byte codes.

OK this is what I'm doing:

1. run JSPC tool:

<target name="jspc" depends="web-compile">
		<taskdef classname="org.apache.jasper.JspC" name="jasper2" >
			<classpath refid="jspc-classpath"/>
		<jasper2 verbose="0"
			outputDir="${web-build}/classes/WEB-INF/src" />


2. compile generated servlets from the 1st step

	<target name="jspc-compile" depends="jspc">
		<javac srcdir="${web-build}/classes/WEB-INF/src"
classpathref="jspc-classpath" encoding="UTF-8" />

3. merge generated_web.xml with original web.xml

4. copy compiled jsp-servlets to WEB-INF/classes

I can deploy my application successfully, but when I access any JSP page I get:

java.lang.UnsupportedOperationException: separate instantiation and
injection is not supported
	org.xh.nuntius.web.jsps.main.contact_jsp._jspService(Unknown Source)
	org.xh.nuntius.web.filters.SecurityAbuseDetectorFilter.doFilter(Unknown Source)
	org.xh.nuntius.web.filters.CharsetFilter.doFilter(Unknown Source)
java.lang.UnsupportedOperationException: separate instantiation and
injection is not supported
Or is there some other way (geronimo-web.xml descriptor?) I can force
Geronimo to pre-compile my JSP pages?

thanks in advance for any hints

best regards
View raw message