I’m trying to solve a problem configuring Jikes as the
compiler for Jetty 5.1.15. I’m getting the stack trace below.
This is using Jetty on an embedded system within an application; not
standalone. My code to instantiate it is very simple at this point:
System.setProperty("jetty.home",
"/opt/gpfs/webapps");
Server server = new
Server();
SocketListener
listener = new SocketListener();
listener.setPort(JETTY_PORT);
server.addListener(listener);
try {
WebApplicationContext[]
ctxs = server.addWebApplications("/opt/gpfs/webapps/");
for
(int i = 0; i < ctxs.length; i++) {
ctxs[i].setDefaultsDescriptor("/opt/gpfs/webapps/etc/webdefault.xml");
}
} catch (Exception e)
{
e.printStackTrace();
}
server.setStopAtShutdown(true);
server.start();
I’ve modified webdefault.xml as follows for the
JspServlet:
<init-param>
<param-name>compiler</param-name>
<param-value>jikes</param-value>
</init-param>
<init-param>
<param-name>javaEncoding</param-name>
<param-value>ISO-8859-1</param-value>
</init-param>
I was hoping to go through the code and figure out the
problem myself but I can’t find any Jasper source code that corresponds
to the Jasper components in the Jetty 5.1.15 release. Can anyone point me
to where this particular version of the source code is (or tell me how to fix
the problem)? I couldn’t find a pointer in any License file,
although I expected it to be there based on my understanding of the licenses.
org.apache.jasper.JasperException: Unable to compile
class for JSP
at
org/apache/jasper/JspCompilationContext.compile
(JspCompilationContext.java:520)
at
org/apache/jasper/servlet/JspServletWrapper.service
(JspServletWrapper.java:296)
at
org/apache/jasper/servlet/JspServlet.serviceJspFile (JspServlet.java:294)
at
org/apache/jasper/servlet/JspServlet.service (JspServlet.java:245)
at javax/servlet/http/HttpServlet.service
(HttpServlet.java:690)
at
org/mortbay/jetty/servlet/ServletHolder.handle (ServletHolder.java:429)
at
org/mortbay/jetty/servlet/WebApplicationHandler.dispatch
(WebApplicationHandler.java:473)
at org/mortbay/jetty/servlet/Dispatcher.dispatch
(Dispatcher.java:287)
at
org/mortbay/jetty/servlet/Dispatcher.forward (Dispatcher.java:172)
at
org/mortbay/jetty/servlet/Default.handleGet (Default.java:304)
at
org/mortbay/jetty/servlet/Default.service (Default.java:223)
at
javax/servlet/http/HttpServlet.service (HttpServlet.java:690)
at
org/mortbay/jetty/servlet/ServletHolder.handle (ServletHolder.java:429)
at
org/mortbay/jetty/servlet/WebApplicationHandler.dispatch
(WebApplicationHandler.java:473)
at
org/mortbay/jetty/servlet/ServletHandler.handle (ServletHandler.java:569)
at
org/mortbay/http/HttpContext.handle (HttpContext.java:1531)
at
org/mortbay/jetty/servlet/WebApplicationContext.handle
(WebApplicationContext.java:634)
at
org/mortbay/http/HttpContext.handle (HttpContext.java:1483)
at
org/mortbay/http/HttpServer.service (HttpServer.java:910)
at
org/mortbay/http/HttpConnection.service (HttpConnection.java:820)
at
org/mortbay/http/HttpConnection.handleNext (HttpConnection.java:986)
at
org/mortbay/http/HttpConnection.handle (HttpConnection.java:837)
at
org/mortbay/http/SocketListener.handleConnection (SocketListener.java:246)
at
org/mortbay/util/ThreadedServer.handle (ThreadedServer.java:358)
at
org/mortbay/util/ThreadPool$PoolThread.run (ThreadPool.java:534)
WARN [SocketListener14-1]
org.mortbay.jetty.servlet.ServletHandler - EXCEPTION
org.apache.jasper.JasperException: Unable to compile
class for JSP
at
org/apache/jasper/JspCompilationContext.compile
(JspCompilationContext.java:520)
at
org/apache/jasper/servlet/JspServletWrapper.service
(JspServletWrapper.java:296)
at
org/apache/jasper/servlet/JspServlet.serviceJspFile (JspServlet.java:294)
at
org/apache/jasper/servlet/JspServlet.service (JspServlet.java:245)
at
javax/servlet/http/HttpServlet.service (HttpServlet.java:690)
at
org/mortbay/jetty/servlet/ServletHolder.handle (ServletHolder.java:429)
at org/mortbay/jetty/servlet/WebApplicationHandler.dispatch
(WebApplicationHandler.java:473)
at
org/mortbay/jetty/servlet/Dispatcher.dispatch (Dispatcher.java:287)
at
org/mortbay/jetty/servlet/Dispatcher.forward (Dispatcher.java:172)
at
org/mortbay/jetty/servlet/Default.handleGet (Default.java:304)
at
org/mortbay/jetty/servlet/Default.service (Default.java:223)
at
javax/servlet/http/HttpServlet.service (HttpServlet.java:690)
at
org/mortbay/jetty/servlet/ServletHolder.handle (ServletHolder.java:429)
at org/mortbay/jetty/servlet/WebApplicationHandler.dispatch
(WebApplicationHandler.java:473)
at
org/mortbay/jetty/servlet/ServletHandler.handle (ServletHandler.java:569)
at
org/mortbay/http/HttpContext.handle (HttpContext.java:1531)
at org/mortbay/jetty/servlet/WebApplicationContext.handle
(WebApplicationContext.java:634)
at
org/mortbay/http/HttpContext.handle (HttpContext.java:1483)
at
org/mortbay/http/HttpServer.service (HttpServer.java:910)
at
org/mortbay/http/HttpConnection.service (HttpConnection.java:820)
at
org/mortbay/http/HttpConnection.handleNext (HttpConnection.java:986)
at
org/mortbay/http/HttpConnection.handle (HttpConnection.java:837)
at
org/mortbay/http/SocketListener.handleConnection (SocketListener.java:246)
at
org/mortbay/util/ThreadedServer.handle (ThreadedServer.java:358)
at
org/mortbay/util/ThreadPool$PoolThread.run (ThreadPool.java:534)