Hi Alin, Yes, it works! Thank you very much for your help.
May be you can help me with my another problem. I want to access my application directly from http://myhost:myport, without application name specified in URL. I tried to use Webapp-Context in osgi.bnd file like this: Webapp-Context: / But I received an exception from jetty: java.lang.IllegalArgumentException: ends with / at org.mortbay.jetty.handler.ContextHandler.setContextPath(ContextHandler.java:912) at org.mortbay.jetty.servlet.Context.<init>(Context.java:124) at org.mortbay.jetty.servlet.Context.<init>(Context.java:72) at org.ops4j.pax.web.service.internal.HttpServiceContext.<init>(HttpServiceContext.java:69) at org.ops4j.pax.web.service.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:93) at org.ops4j.pax.web.service.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:79) at org.ops4j.pax.web.service.internal.JettyServerImpl.addServlet(JettyServerImpl.java:116) at org.ops4j.pax.web.service.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:214) at org.ops4j.pax.web.service.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:90) at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:287) at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:247) Thanks in advance, Olga On Mon, Apr 6, 2009 at 12:50 PM, Alin Dreghiciu <[email protected]>wrote: > The resources are searched in the classpath of the bundle, so in your > case it will not be found because you do not have th eroot of the > bundle in the classpath. You will need to change the classpath to: > > Bundle-ClassPath: .,WEB-INF/classes/ > > On Mon, Apr 6, 2009 at 10:46 AM, Olga Kudryavtseva > <[email protected]> wrote: > > Hi Alin, > > > > Thank you for the answer. > > > > This is a value in manifest.mf > > > > Bundle-ClassPath: WEB-INF/classes/ > > > > Best regards, > > Olga > > > > > > On Fri, Apr 3, 2009 at 7:28 PM, Alin Dreghiciu <[email protected]> > wrote: > >> > >> What is the value of Bundle-ClassPath in MANIFEST.MF? > >> > >> On Fri, Apr 3, 2009 at 5:50 PM, Olga Kudryavtseva > >> <[email protected]> wrote: > >> > This is an error message in browser when I call > >> > http://localhost:8080/test/hello.html > >> > > >> > HTTP ERROR: 404 > >> > > >> > NOT_FOUND > >> > > >> > RequestURI=/test/hello.html > >> > > >> > Powered by Jetty:// > >> > > >> > This is a log message which i can see in console > >> >>Debug [6] Handling request for [/test/hello.html] using http context > >> >> [org.ops4j.pax.web.extender.war.internal.webapphttpcont...@9a18a0] > >> >> init...@reference:file:plugins/pax-logging-api-1.3.0.jar/ > >> >>Debug [6] Apply welcome files filter... > >> >> init...@reference:file:plugins/pax-logging-api-1.3.0.jar/ > >> >>Debug [6] Servlet path: /hello.html > >> >> init...@reference:file:plugins/pax-logging-api-1.3.0.jar/ > >> >>Debug [6] Path info: null > >> >> init...@reference:file:plugins/pax-logging-api-1.3.0.jar/ > >> >>Debug [6] Searching bundle [file:./servlet-ebay-2.0-SNAPSHOT.war [35]] > >> >> for > >> >> resource [/hello.html], normalized to [hello.html] > >> >> init...@reference:file:plugins/pax-logging-api-1.3.0.jar/ > >> >>Debug [6] Resource not found > >> >> init...@reference:file:plugins/pax-logging-api-1.3.0.jar/ > >> > > >> > in manifest.mf: > >> > Webapp-Context: test > >> > > >> > > >> > Thank you for your help, > >> > Olga > >> > > >> > > >> > On Fri, Apr 3, 2009 at 6:33 PM, Alin Dreghiciu <[email protected]> > >> > wrote: > >> >> > >> >> Can you show me the 404 message you get in browser and url? I suppose > >> >> that you are accessing "hello.html". > >> >> > >> >> On Fri, Apr 3, 2009 at 5:26 PM, Olga Kudryavtseva > >> >> <[email protected]> wrote: > >> >> > My WAR structure is: > >> >> > META-INF > >> >> > manifest.mf > >> >> > WEB-INF > >> >> > web.xml > >> >> > lib/... > >> >> > classes/... > >> >> > hello.html > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > On Fri, Apr 3, 2009 at 5:43 PM, Alin Dreghiciu < > [email protected]> > >> >> > wrote: > >> >> >> > >> >> >> No, the resources are automatically registered by default. Where > are > >> >> >> those resources located in your WAR? > >> >> >> > >> >> >> On Fri, Apr 3, 2009 at 11:41 AM, Olga Kudryavtseva > >> >> >> <[email protected]> wrote: > >> >> >> > Hi all, > >> >> >> > > >> >> >> > I have installed Pax Web and Pax Web Extender WAR. I am able to > >> >> >> > deploy > >> >> >> > my > >> >> >> > war files, but only servlet configured in web.xml is accessible. > >> >> >> > When > >> >> >> > I > >> >> >> > try > >> >> >> > to access static resources (html, images) I have 404 error. > >> >> >> > Can you please give me an advice how I can access static > >> >> >> > resources? > >> >> >> > Is > >> >> >> > it > >> >> >> > necessary to register such resources in activator or somewhere > >> >> >> > else? > >> >> >> > > >> >> >> > > >> >> >> > Thanks in advance, > >> >> >> > Olga Kudryavtseva > >> >> >> > www.griddynamics.com > >> >> >> > > >> >> >> > _______________________________________________ > >> >> >> > general mailing list > >> >> >> > [email protected] > >> >> >> > http://lists.ops4j.org/mailman/listinfo/general > >> >> >> > > >> >> >> > > >> >> >> > >> >> >> > >> >> >> > >> >> >> -- > >> >> >> Alin Dreghiciu > >> >> >> http://www.ops4j.org - New Energy for OSS Communities - Open > >> >> >> Participation Software. > >> >> >> http://www.qi4j.org - New Energy for Java - Domain Driven > >> >> >> Development. > >> >> >> Looking for a job. > >> >> >> > >> >> >> _______________________________________________ > >> >> >> general mailing list > >> >> >> [email protected] > >> >> >> http://lists.ops4j.org/mailman/listinfo/general > >> >> > > >> >> > > >> >> > _______________________________________________ > >> >> > general mailing list > >> >> > [email protected] > >> >> > http://lists.ops4j.org/mailman/listinfo/general > >> >> > > >> >> > > >> >> > >> >> > >> >> > >> >> -- > >> >> Alin Dreghiciu > >> >> http://www.ops4j.org - New Energy for OSS Communities - Open > >> >> Participation Software. > >> >> http://www.qi4j.org - New Energy for Java - Domain Driven > Development. > >> >> Looking for a job. > >> >> Sent from Cluj-Napoca, CJ, Romania > >> >> > >> >> _______________________________________________ > >> >> general mailing list > >> >> [email protected] > >> >> http://lists.ops4j.org/mailman/listinfo/general > >> > > >> > > >> > _______________________________________________ > >> > general mailing list > >> > [email protected] > >> > http://lists.ops4j.org/mailman/listinfo/general > >> > > >> > > >> > >> > >> > >> -- > >> Alin Dreghiciu > >> http://www.ops4j.org - New Energy for OSS Communities - Open > >> Participation Software. > >> http://www.qi4j.org - New Energy for Java - Domain Driven Development. > >> Looking for a job. > >> Sent from Cluj-Napoca, CJ, Romania > >> > >> _______________________________________________ > >> general mailing list > >> [email protected] > >> http://lists.ops4j.org/mailman/listinfo/general > > > > > > _______________________________________________ > > general mailing list > > [email protected] > > http://lists.ops4j.org/mailman/listinfo/general > > > > > > > > -- > Alin Dreghiciu > http://www.ops4j.org - New Energy for OSS Communities - Open > Participation Software. > http://www.qi4j.org - New Energy for Java - Domain Driven Development. > Looking for a job. > Sent from Cluj-Napoca, CJ, Romania > > _______________________________________________ > general mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/general >
_______________________________________________ general mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/general
