How to use embedded jetty with maven overlays

I'm writing extension to java web application. I add this application to my extension with maven overlay plugin and use web.xml file and webapp folder from main application. Also I want to write integration test platform for my extension with jetty embedded server. I've tried

@Test public void jetty() throws Exception { Server server = new Server(9090); WebAppContext context = new WebAppContext(); context.setDescriptor("WEB-INF/web.xml"); context.setResourceBase("src/main/webapp"); context.setContextPath("/"); context.setParentLoaderPriority(true); server.setHandler(context); server.start(); server.join(); }

But jetty can't find web.xml file from overlayed project. How i need to write the path to web.xml and webapp directory to make embbedded jetty work?

Category:java Views:0 Time:2014-01-23

Related post

  • Maven Embedded Jetty Container fails to load Taglibs: Unable to initialize TldLocationsCache 2009-01-24

    I'm using the Maven Cargo Plugin to startup a Jetty web container for running some integration tests in a separate project module. The problem i'm battling with occurs when i added taglibs into the jsp pages and tried hitting them from the integratio

  • Using maven and embedded jetty: ClassCastException 2010-03-29

    I have a web-application written in java. I would like to run integration tests on a embedded jetty server. For that purpose I have a maven project (just for running integration tests). For deploying I use cargo-maven2-plugin. But while jetty startup

  • Configuring Jetty JSP support in embedded mode in Maven project 2010-11-20

    I can visit .html pages with Jetty, but when I visit a .jsp page I get: 0 13:21:13 / [INFO] No JSP support. Check that JSP jars are in lib/jsp and that the JSP option has been specified to start.jar I added the following as dependencies: <dependen

  • Embedded jetty maven profile.xml 2011-01-21

    I try to start jetty in embedded form but i have problems I need to read properties values in profile.xml before embedded jetty starts. Any suggestions ? Here is profile.xml's content ..... <profile> <id>local-dev</id> <activatio

  • How do you get an embedded Jetty webserver to dump its interim Java code for JSPs 2008-09-18

    I keep running into this problem when debugging JSP pages in OpenNMS. The Jetty wiki talks about keepGenerated ( in webdefault.xml but it seems unclear how this works in embedded setups. ----------

  • cannot load JSTL taglib within embedded Jetty server 2010-01-27

    I am writing a web application that runs within an embedded Jetty instance. When I attempt to execute a JSTL statement, I receive the following exception: org.apache.jasper.JasperException: /index.jsp(1,63) PWC6188: The absolute uri: http://java.sun.

  • Wicket app in embedded Jetty causes UnsupportedClassVersionError 2010-05-05

    I've tried to run a Wicket app in an embedded Jetty, using this code: public static void main( String[] args ){ Server server = new Server(8080); Context root = new Context( server, "/", Context.SESSIONS ); FilterHolder filterHolder = new FilterHolde

  • Servlet 3.0 support in embedded Jetty 8.0 2010-08-11

    For my unit-tests I use a simple test-server based on Jetty: package eu.kostia.textanalysis.webservices.jetty; import java.awt.Desktop; import; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.webapp.WebAppContext; public

  • Getting started with embedded Jetty 2010-12-08

    I just got started with embedded jetty. I'm stuck at some error messages. It's simple and straightforward few lines code, which I found online and wanted to test out. import org.jaxen.Context; import org.mortbay.jetty.Server; import org.mortbay.jetty

Copyright (C), All Rights Reserved.

processed in 0.092 (s). 11 q(s)