Eclipse RCP plugin + embedded Jetty + JSF

前端 未结 2 1784
走了就别回头了
走了就别回头了 2021-02-03 17:36

I made an RCP plugin with embedded Jetty as following:

1) In plugin.xml -> Dependencies, I have added the following:

org.eclipse.equinox.http.jetty
org.e         


        
相关标签:
2条回答
  • 2021-02-03 18:16

    Take a look at setting a context in jetty. You can define it before start your server.

    public class OneWebApp
    {
        public static void main(String[] args) throws Exception
        {
            String jetty_home = System.getProperty("jetty.home","..");
    
            Server server = new Server(8080);
    
            WebAppContext webapp = new WebAppContext();
            webapp.setContextPath("/");
            webapp.setWar(jetty_home+"/webapps/test.war");
            server.setHandler(webapp);
    
            server.start();
            server.join();
        }
    }
    
    0 讨论(0)
  • 2021-02-03 18:17

    A JSP Extension Factory class in org.eclipse.equinox.jsp.jasper.registry provides JSP support for use in conjunction with the servlets extension point.

    The JSPFactory can be used in conjunction with org.eclipse.equinox.http.registry and the Servlets extension point to allow the use of JSPs declaratively with the extension registry.

    JSPFactory will accept a "path" parameter corresponding to the base path in the bundle to look up JSP resources. This parameter can be set using the ":" separator approach or by xml parameter.

    e.g. class="org.eclipse.equinox.jsp.jasper.registry.JSPFactory:/A/PATH" or

    0 讨论(0)
提交回复
热议问题