I am getting this exception when i start my embedded war file.
INFO | jvm 1 | 2015/07/13 14:45:32 | Caused by:
INFO | jvm 1 | 2015/07/13 14:45:32 | java.lang.NullPointerException
INFO | jvm 1 | 2015/07/13 14:45:32 | at org.apache.jasper.compiler.Validator$ValidateVisitor.<init>(Validator.java
:515)
INFO | jvm 1 | 2015/07/13 14:45:32 | at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1
853)
INFO | jvm 1 | 2015/07/13 14:45:32 | at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
INFO | jvm 1 | 2015/07/13 14:45:32 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
INFO | jvm 1 | 2015/07/13 14:45:32 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
INFO | jvm 1 | 2015/07/13 14:45:32 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
Server srv = new Server(port);
srv.setStopAtShutdown(true);
// Get the war-file
ProtectionDomain protectionDomain = Main.class.getProtectionDomain();
String warFile = protectionDomain.getCodeSource().getLocation().toExternalForm();
String currentDir = new File(protectionDomain.getCodeSource().getLocation().getPath()).getParent();
// Add the warFile (this jar)
WebAppContext context = new WebAppContext(warFile, contextPath);
context.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
context.setClassLoader(new WebAppClassLoader(getClass().getClassLoader(), context));
context.setServer(srv);
// Add the handlers
HandlerList handlers = new HandlerList();
handlers.addHandler(context);
srv.setHandler(handlers);
srv.start();
srv.join();