My apologies for cross-posting this from [email protected] but this list seems slightly more active and I'm still having the same problem with Jetty 7. Here goes:

Hey list,

I am currently trying to setup an embedded Jetty instance for use in test cases. It's just lovely with how few lines of code Jetty can be started but I'm currently stumbling with properly running my web app.

It uses Apache's XmlRpcServlet internally. The way I'm firing up Jetty is this:

    Server jetty = new Server();
    XmlConfiguration configuration = new XmlConfiguration(
        new FileInputStream("src/main/config/jetty.xml"));
    configuration.configure(jetty);

    WebAppContext wac = new WebAppContext(
        "src/main/webapp", "/pm-server");
    jetty.setHandler(wac);

    jetty.start();
    jetty.join();

Now the context is basically starting up fine, I can reach it at http://localhost:8081/pm-server/xmlrpc (as defined in web.xml). However, when I go to that link I get the error "Failed to locate resource XmlRpcServlet.properties". The XmlRpcServlet.properties is loaded with

    XmlRpcServlet.class.getResource("XmlRpcServlet.properties");

and is located in src/main/webapp/WEB-INF/classes/org/apache/xmlrpc/webserver/XmlRpcServlet.properties.

It seems the class loader is looking for resources in the wrong directory. Is there a way I can check which directories it searches? How can I tell it where to look?

When I run Jetty with mvn jetty:run everything is fine so I guess my configs and the location of XmlRpcServlet.properties are correct but of course I can post them as well.

Any hints would be greatly appreciated.

Thanks and best regards,
Georg
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to