How to make jersey servlet to load more than one service or class in java REST application
<p>I have Two different java files in the same package. The classes are EntryPoint.java and ModelInn.java .
Now, when the jersey servlet starts, I want it to load both the EntryPoint class and ModelInn class. But For the meantime I can only load one. But I want to load the two classes. Am using jetty 9.</p>

<p>Below is the code i used to load EntryPoint java class</p>

<pre><code>package com.rest.test;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;

public class App {
    public static void main(String[] args) throws Exception {
        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
        context.setContextPath("/");

        Server jettyServer = new Server(8080);
        jettyServer.setHandler(context);

        ServletHolder jerseyServlet = context.addServlet(
             org.glassfish.jersey.servlet.ServletContainer.class, "/*");
        jerseyServlet.setInitOrder(0);

        // Tells the Jersey Servlet which REST service/class to load.
        jerseyServlet.setInitParameter(
           "jersey.config.server.provider.classnames",
           EntryPoint.class.getCanonicalName());

        try {
            jettyServer.start();
            jettyServer.join();
        } finally {
            jettyServer.destroy();
        }
    }
}
</code></pre>