Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Jetty 9 on Java 6

I work for a corporation that won't upgrade from JRE 6 to JRE 7 on our servers. I have successfully developed some code that works on JRE 7 using Jetty 9. However, I can't run this code on the corporation server. I was wondering if anyone out here knew of a way to run Jetty 9 on JRE 6. I specifically need the HTTPConfiguration class from Jetty 9.

The only potential thing I can think of would be to download Jetty, set it to a 1.6 compliance and work from that. I'm really hoping (with a shot in the dark) that someone has a better idea.

like image 655
Keshava Murthy Avatar asked Jan 24 '14 15:01

Keshava Murthy


People also ask

Does Jetty use Apache?

In terms of licensing, Tomcat enjoys the Apache 2.0 open source license, while Jetty is dual licensed through both the Apache 2.0 License and the Eclipse Public License 1.0.

What is jetty9?

Jetty provides a web server and servlet container, additionally providing support for HTTP/2, WebSocket, OSGi, JMX, JNDI, JAAS and many other integrations.

How do you deploy war in Jetty?

The standard way of deploying Jetty applications is copying a WAR file to $JETTY_HOME\webapps and letting Jetty's deployment scanner scan and automatically deploy the file. You can also customize application deployments in Jetty using the Jetty Deployable Descriptor XML File).


1 Answers

No, Jetty 9 required Java 7 since the servlet api (servlet 3.1) requires Java 7. While 9.0 could have in theory worked on Java 6 our intent had been that 9 would be servlet 3.1 and it wasn't until 9.1 that we made the servlet api switch...which was mostly due to timing issues more than anything.

[update] Jetty 9.2.x is Java 7 and Jetty 9.3.x onwards will require Java 8. This is largely due to requirements of supporting the HTTP/2 protocol which Jetty 9.3.x does...in spades.

like image 51
jesse mcconnell Avatar answered Oct 02 '22 23:10

jesse mcconnell