Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] how to downgrade jetty-9 to jetty-8?

Also, Jetty 8 is EOL.

https://dev.eclipse.org/mhonarc/lists/jetty-announce/msg00069.html

And Java 6 was EOL back in Feb 2013 (announcement of EOL back in 2011)

http://www.oracle.com/technetwork/java/eol-135779.html

Do not run those Jetty applications on the public internet, as you have no recent security updates for Java.
(Its fine if you use it on controlled internal intranets though)


--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Mon, Dec 8, 2014 at 12:49 AM, Uk Jo <verystrongjoe@xxxxxxxxx> wrote:
I implemented the jetty server to load 3 web application contexts. But many clients' system are using JDK 6. So I have to downgrade jetty 8. 
But I have to hurry to achieving this. Please let me know the shortcut for this. I implemented to load 3 webapplication contexts using xml and java program with jetty 9 version.  The below is what I implemented my source code recently. These source code have to be replaced to the one of version 8.  Help me. 
Detaily, Right now, I can't find org.eclipse.jetty.server.ServerConnector in jetty 8. How can I replace the logis related to this class?


 XmlConfiguration configuration = null;
Server server = null;
WebAppContext wac = null;
if(jettyConfigPath == null){ // running classpath
if(jettyConfPathList.contains("context/server/context-jetty-server.xml")) {
Resource server_xml = Resource.newResource(getFileinJar("context/server/context-jetty-server.xml").getAbsolutePath()      );
configuration = new XmlConfiguration(server_xml.getInputStream());
server = (Server) configuration.configure();
}
if(jettyConfPathList.contains("context/server/context-jetty-wac.xml")) {
Resource wac_xml = Resource.newResource(getFileinJar("context/server/context-jetty-wac.xml").getAbsolutePath()      );
configuration =  new XmlConfiguration(wac_xml.getInputStream());
wac = (WebAppContext) configuration.configure();
}
} else{ // running from file / system property was set.
configuration = new XmlConfiguration(new URL("file:" + jettyConfigPath + "/context-jetty-server.xml"));
server = (Server) configuration.configure();
configuration =  new XmlConfiguration(new URL("file:" + jettyConfigPath + "/context-jetty-wac.xml"));
wac = (WebAppContext) configuration.configure();
wac.setExtractWAR(false);
wac.setWar(webAppDir);s
}
wac.setWar(webAppDir);

HandlerCollection hc = new  HandlerCollection();

WebAppContext derbyWebapp = new WebAppContext();
derbyWebapp.setContextPath("/derby");
derbyWebapp.setWar(derbyWebAppDir);

        WebAppContext pluginServerWebapp = new WebAppContext();
        
        pluginServerWebapp.setContextPath( "/plugin.server");
        pluginServerWebapp.setWar(pluginServerWebAppDir);
        
        HashLoginService login = new HashLoginService();
        login.setName("RedcaRealm");
        login.setConfig("conf/jetty-realm.properties");
        login.setRefreshInterval(0);
        server.addBean(login);
    
hc.addHandler(wac);
hc.addHandler(derbyWebapp);
hc.addHandler(pluginServerWebapp);
server.setHandler(hc);

server.start();
server.join();

--
Success is a long continuous journey..
                                     - From Arnold

_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top