Community
Participate
Working Groups
Created attachment 183779 [details] A simple WAB I have attached a sample WAB that I used to create this problem. The WAB contains a single html file and a manifest with the 'Web-ContextPath' header set to '/simple'. Deploying the WAB on normal Virgo works fine and the webpage is accessible at /simple. When deploying with Jetty as the RFC66 impl it appears from the log as though nothing happens so I'm guessing the OSGi extender isn't picking it up. This may be because it has no web.xml.
Created attachment 184555 [details] Slightly modified Test WAB from http://wiki.eclipse.org/Jetty/Tutorial/Jetty-OSGi_SDK I'm having the same problem with the Jetty 7.1.6 bundles from the helios updates site in Eclipse/Equinox 3.6. I've included a slightly modified WAB based on the one at http://wiki.eclipse.org/Jetty/Tutorial/Jetty-OSGi_SDK. I change the url pattern for the servlet in the web.xml and add an index.html file for static content. I also include the run configuration I use to launch this from within Eclipse 3.6 just in case. The exact behaviour I'm getting with this is after launching the run configuration, there is nothing running on port 8080 and http://localhost:8080/test/servlet doesn't go anywhere, of course. Below is the output I get from the OSGi console. osgi> No default jetty started. Returning defaultJettyServer = null Returning defaultJettyServer = null ss Framework is launched. id State Bundle 0 ACTIVE org.eclipse.osgi_3.6.1.R36x_v20100806 Fragments=33 1 ACTIVE org.eclipse.jetty.server_7.1.6.v20100715 2 ACTIVE org.eclipse.jetty.continuation_7.1.6.v20100715 3 ACTIVE org.eclipse.jetty.util_7.1.6.v20100715 4 ACTIVE org.eclipse.jetty.client_7.1.6.v20100715 5 ACTIVE org.eclipse.jetty.servlet_7.1.6.v20100715 6 ACTIVE org.eclipse.jetty.osgi.boot_7.1.6.v20100715 7 ACTIVE org.eclipse.jetty.security_7.1.6.v20100715 8 ACTIVE javax.servlet_2.5.0.v200910301333 9 ACTIVE org.eclipse.jetty.webapp_7.1.6.v20100715 10 ACTIVE org.eclipse.osgi.services_3.2.100.v20100503 11 ACTIVE org.eclipse.jetty.example.webapp_1.0.0.qualifier 12 ACTIVE org.eclipse.jetty.http_7.1.6.v20100715 13 ACTIVE org.eclipse.jetty.xml_7.1.6.v20100715 14 ACTIVE org.eclipse.jetty.io_7.1.6.v20100715 15 ACTIVE org.eclipse.jetty.deploy_7.1.6.v20100715 16 ACTIVE org.eclipse.jetty.servlets_7.1.6.v20100715 18 ACTIVE org.eclipse.jetty.osgi.httpservice_7.1.6.v20100715 19 ACTIVE org.eclipse.equinox.http.servlet_1.1.0.v20100503 23 ACTIVE org.eclipse.jetty.osgi.boot.warurl_7.1.6.v20100715 26 ACTIVE javax.activation_1.1.0.v201005080500 27 ACTIVE org.eclipse.jetty.annotations_7.1.6.v20100715 28 ACTIVE org.eclipse.jetty.jndi_7.1.6.v20100715 29 ACTIVE org.eclipse.jetty.jmx_7.1.6.v20100715 30 ACTIVE org.eclipse.jetty.rewrite_7.1.6.v20100715 31 ACTIVE org.eclipse.jetty.websocket_7.1.6.v20100715 32 ACTIVE javax.mail.glassfish_1.4.1.v201005082020 33 RESOLVED javax.transaction_1.1.1.v201004190952 Master=0 34 ACTIVE org.objectweb.asm_3.2.0.v200909071300 35 ACTIVE org.eclipse.jetty.plus_7.1.6.v20100715
(In reply to comment #1) My apologies for the very late response: the recent releases of jetty-osgi require a system property or an OSGi service be registered to start jetty. The 2 ways to start jetty via system properties is to specify either one of: -Djetty.home=/path/to/jettyhome or -Djetty.home.bundle=symbloic.name.of.bundle.with.jettyhome This would explain the logs: osgi> No default jetty started. Returning defaultJettyServer = null Returning defaultJettyServer = null and the further consequence that nothing happens.
(In reply to comment #0) > Created attachment 183779 [details] > A simple WAB > > I have attached a sample WAB that I used to create this problem. The WAB > contains a single html file and a manifest with the 'Web-ContextPath' header > set to '/simple'. > > Deploying the WAB on normal Virgo works fine and the webpage is accessible at > /simple. When deploying with Jetty as the RFC66 impl it appears from the log as > though nothing happens so I'm guessing the OSGi extender isn't picking it up. > This may be because it has no web.xml. Hi Chris, I added support to deploy a WAB that does not have a web.xml but jetty does not pick it up. Well it does start the webapp and creates the WebappContext and all but never routes requests to the default servlet. When I try to find out if webapps without web.xml are supported it seems that all the answers I get are pointing at servlet-3.0 to be able to do that. I am asking the rest of the jetty team if they know better.
Hi, Yeah I saw the post in jetty-dev. I didn't realise it wasn't in the 2.5 spec. I guess it's up to you guys unless it's in the 3.0 spec. Thanks, Chris.
(In reply to comment #4) It seems that some features of jetty-8 (servlet-3.0) have been back-ported to jetty-7 (servlet-2.5). I would not be surprised if this case is not supported with jetty-8 either and the same changes would be need in jetty-8 and jetty-7 to support it. We will see what the core team answer ... although it is already the weekend in this part of the world.
Assigning to Jan, question about servlet spec v3.0.
Jan, I have just verified that the attached WAB where there is no web.xml works fine in jetty-8 OSGi.
Hi Hugues, I'm not sure what's going on here. Jetty-7 supports webapps that have no web.xml. I just tried simple.jar renamed to simple.war in the non-osgi jetty-7.4.2 distro and it works just fine... Is there something in the jetty-7 osgi plumbing that is preventing this webapp bundle working???? Jan (In reply to comment #7) > Jan, I have just verified that the attached WAB where there is no web.xml works > fine in jetty-8 OSGi.
Test jetty-7.6.3 and the simple WAB works fine. Either something has changed since the version of the initial report, or the initial report was not correct. Either way, this is working now, so I'm closing the issue. Jan