Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Embedded jetty

Fixed it, was missing this: classlist.addBefore("org.eclipse.jetty.webapp.JettyWebXmlConfiguration", "org.eclipse.jetty.annotations.AnnotationConfiguration");

On Mon, Jul 13, 2015 at 4:42 PM Idar Borlaug <idar.borlaug@xxxxxxxxx> wrote:
Thanks, but i get the same exceptions:

rg.apache.jasper.JasperException: java.lang.IllegalStateException: No org.apache.tomcat.InstanceManager set in ServletContext
	at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:176)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
	at org.eclipse.jetty.jsp.JettyJspServlet.service(JettyJspServlet.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

And 
Caused by: java.lang.NullPointerException
	at org.apache.jasper.compiler.Validator$ValidateVisitor.<init>(Validator.java:515)
	at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1853)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)


On Mon, Jul 13, 2015 at 4:36 PM Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Change

context.setClassLoader(new WebAppClassLoader(getClass().getClassLoader(), context));

to

ClassLoader jspClassLoader = new URLClassLoader(new URL[0], context.getClass().getClassLoader());
context.setClassLoader(jspClassLoader);

you accidentally created a complicated circular mess of classloaders.

Joakim Erdfelt / joakim@xxxxxxxxxxx

On Mon, Jul 13, 2015 at 6:54 AM, Idar Borlaug <idar.borlaug@xxxxxxxxx> wrote:

On Mon, Jul 13, 2015 at 3:53 PM Idar Borlaug <idar.borlaug@xxxxxxxxx> wrote:
Attaching an example: Can anyone tell me what i am missing here?
--
Idar Borlaug

--
Idar Borlaug


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
--
Idar Borlaug

--
Idar Borlaug


Back to the top