You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Adam Bird (JIRA)" <ji...@apache.org> on 2011/04/19 19:08:05 UTC

[jira] [Created] (KARAF-577) Cannot Run WAR From Root Context

Cannot Run WAR From Root Context
--------------------------------

                 Key: KARAF-577
                 URL: https://issues.apache.org/jira/browse/KARAF-577
             Project: Karaf
          Issue Type: Bug
    Affects Versions: 2.2.0
         Environment: Tested on Ubuntu 10.10
            Reporter: Adam Bird


Web applications do not appear to run in the root application context in Karaf 2.2.0 (this is not an issue in Karaf 2.1.4).  The problem is easily duplicated using the Tomcat sample WAR, as follows.

1. Run the following command from Karaf:

osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/anything

2. Access the app from your web browser (http://localhost:8181/anything/index.html)
3. Uninstall the sample bundle
4. Reinstall the bundle using the root context path with the following command:

osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/

5. Attempt to access the app from your web browser (http://localhost:8181/index.html)
6. Note the 404 error.

Looking at the logs, it appears that when a web app is in the root application context, it prepends a "/default/" to any request.  For example, when trying to access /index.html it looks for /default/index.html, fails to find the page, and returns a not found error (see the log output below for more details).

----------------------------------------------------------------------

LOG OUTPUT

15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | REQUEST /index.html on org.eclipse.jetty.server.nio.SelectChannelConnector$3@693a1324
15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  268 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Matching [/index.html]...
15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  292 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Path [/index.html] matched to {pattern=/.*,model=ResourceModel{id=org.ops4j.pax.web.service.spi.model.ResourceModel-22,name=default,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/,alias=/,name=default},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-21,name=,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25,contextParams={webapp.context=}}}}
15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | Got Session ID 17kb0ch4hv02w1ennfxju5owpw from cookie
15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7d8aecf1
15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | session=null
15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet=default
15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet holder=
15:14:46,271 | DEBUG | 30 - /index.html | HttpServiceContext               | etty.internal.HttpServiceContext  115 | 54 - org.ops4j.pax.web.pax-web-jetty - 1.0.1 | Handling request for [/index.html] using http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25]
15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | chain=
15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  113 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Searching bundle [tomcat-sample [97]] for resource [default/index.html], normalized to [default/index.html]
15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  140 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Resource not found 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (KARAF-577) Cannot Run WAR From Root Context

Posted by "Achim Nierbeck (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021841#comment-13021841 ] 

Achim Nierbeck edited comment on KARAF-577 at 4/20/11 10:03 AM:
----------------------------------------------------------------

if pax web is upgraded this issue can be closed

because 

http://issues.ops4j.org/browse/PAXWEB-266

is fixed

--- edit 20.04.11

not quite there yet, there is still an issue with it. 
will be fixed soon though


      was (Author: achim_nierbeck):
    if pax web is upgraded this issue can be closed

because 

http://issues.ops4j.org/browse/PAXWEB-266

is fixed
  
> Cannot Run WAR From Root Context
> --------------------------------
>
>                 Key: KARAF-577
>                 URL: https://issues.apache.org/jira/browse/KARAF-577
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Tested on Ubuntu 10.10
>            Reporter: Adam Bird
>            Assignee: Achim Nierbeck
>             Fix For: 2.2.1
>
>
> Web applications do not appear to run in the root application context in Karaf 2.2.0 (this is not an issue in Karaf 2.1.4).  The problem is easily duplicated using the Tomcat sample WAR, as follows.
> 1. Run the following command from Karaf:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/anything
> 2. Access the app from your web browser (http://localhost:8181/anything/index.html)
> 3. Uninstall the sample bundle
> 4. Reinstall the bundle using the root context path with the following command:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/
> 5. Attempt to access the app from your web browser (http://localhost:8181/index.html)
> 6. Note the 404 error.
> Looking at the logs, it appears that when a web app is in the root application context, it prepends a "/default/" to any request.  For example, when trying to access /index.html it looks for /default/index.html, fails to find the page, and returns a not found error (see the log output below for more details).
> ----------------------------------------------------------------------
> LOG OUTPUT
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | REQUEST /index.html on org.eclipse.jetty.server.nio.SelectChannelConnector$3@693a1324
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  268 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Matching [/index.html]...
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  292 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Path [/index.html] matched to {pattern=/.*,model=ResourceModel{id=org.ops4j.pax.web.service.spi.model.ResourceModel-22,name=default,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/,alias=/,name=default},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-21,name=,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25,contextParams={webapp.context=}}}}
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | Got Session ID 17kb0ch4hv02w1ennfxju5owpw from cookie
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7d8aecf1
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | session=null
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet=default
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet holder=
> 15:14:46,271 | DEBUG | 30 - /index.html | HttpServiceContext               | etty.internal.HttpServiceContext  115 | 54 - org.ops4j.pax.web.pax-web-jetty - 1.0.1 | Handling request for [/index.html] using http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25]
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | chain=
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  113 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Searching bundle [tomcat-sample [97]] for resource [default/index.html], normalized to [default/index.html]
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  140 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Resource not found 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (KARAF-577) Cannot Run WAR From Root Context

Posted by "Achim Nierbeck (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Achim Nierbeck reassigned KARAF-577:
------------------------------------

    Assignee: Achim Nierbeck

> Cannot Run WAR From Root Context
> --------------------------------
>
>                 Key: KARAF-577
>                 URL: https://issues.apache.org/jira/browse/KARAF-577
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Tested on Ubuntu 10.10
>            Reporter: Adam Bird
>            Assignee: Achim Nierbeck
>             Fix For: 2.2.1
>
>
> Web applications do not appear to run in the root application context in Karaf 2.2.0 (this is not an issue in Karaf 2.1.4).  The problem is easily duplicated using the Tomcat sample WAR, as follows.
> 1. Run the following command from Karaf:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/anything
> 2. Access the app from your web browser (http://localhost:8181/anything/index.html)
> 3. Uninstall the sample bundle
> 4. Reinstall the bundle using the root context path with the following command:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/
> 5. Attempt to access the app from your web browser (http://localhost:8181/index.html)
> 6. Note the 404 error.
> Looking at the logs, it appears that when a web app is in the root application context, it prepends a "/default/" to any request.  For example, when trying to access /index.html it looks for /default/index.html, fails to find the page, and returns a not found error (see the log output below for more details).
> ----------------------------------------------------------------------
> LOG OUTPUT
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | REQUEST /index.html on org.eclipse.jetty.server.nio.SelectChannelConnector$3@693a1324
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  268 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Matching [/index.html]...
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  292 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Path [/index.html] matched to {pattern=/.*,model=ResourceModel{id=org.ops4j.pax.web.service.spi.model.ResourceModel-22,name=default,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/,alias=/,name=default},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-21,name=,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25,contextParams={webapp.context=}}}}
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | Got Session ID 17kb0ch4hv02w1ennfxju5owpw from cookie
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7d8aecf1
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | session=null
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet=default
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet holder=
> 15:14:46,271 | DEBUG | 30 - /index.html | HttpServiceContext               | etty.internal.HttpServiceContext  115 | 54 - org.ops4j.pax.web.pax-web-jetty - 1.0.1 | Handling request for [/index.html] using http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25]
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | chain=
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  113 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Searching bundle [tomcat-sample [97]] for resource [default/index.html], normalized to [default/index.html]
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  140 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Resource not found 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (KARAF-577) Cannot Run WAR From Root Context

Posted by "Achim Nierbeck (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Achim Nierbeck resolved KARAF-577.
----------------------------------

    Resolution: Fixed

fixed with pax-web 1.0.3

> Cannot Run WAR From Root Context
> --------------------------------
>
>                 Key: KARAF-577
>                 URL: https://issues.apache.org/jira/browse/KARAF-577
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Tested on Ubuntu 10.10
>            Reporter: Adam Bird
>            Assignee: Achim Nierbeck
>             Fix For: 2.2.1
>
>
> Web applications do not appear to run in the root application context in Karaf 2.2.0 (this is not an issue in Karaf 2.1.4).  The problem is easily duplicated using the Tomcat sample WAR, as follows.
> 1. Run the following command from Karaf:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/anything
> 2. Access the app from your web browser (http://localhost:8181/anything/index.html)
> 3. Uninstall the sample bundle
> 4. Reinstall the bundle using the root context path with the following command:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/
> 5. Attempt to access the app from your web browser (http://localhost:8181/index.html)
> 6. Note the 404 error.
> Looking at the logs, it appears that when a web app is in the root application context, it prepends a "/default/" to any request.  For example, when trying to access /index.html it looks for /default/index.html, fails to find the page, and returns a not found error (see the log output below for more details).
> ----------------------------------------------------------------------
> LOG OUTPUT
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | REQUEST /index.html on org.eclipse.jetty.server.nio.SelectChannelConnector$3@693a1324
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  268 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Matching [/index.html]...
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  292 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Path [/index.html] matched to {pattern=/.*,model=ResourceModel{id=org.ops4j.pax.web.service.spi.model.ResourceModel-22,name=default,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/,alias=/,name=default},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-21,name=,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25,contextParams={webapp.context=}}}}
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | Got Session ID 17kb0ch4hv02w1ennfxju5owpw from cookie
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7d8aecf1
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | session=null
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet=default
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet holder=
> 15:14:46,271 | DEBUG | 30 - /index.html | HttpServiceContext               | etty.internal.HttpServiceContext  115 | 54 - org.ops4j.pax.web.pax-web-jetty - 1.0.1 | Handling request for [/index.html] using http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25]
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | chain=
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  113 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Searching bundle [tomcat-sample [97]] for resource [default/index.html], normalized to [default/index.html]
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  140 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Resource not found 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (KARAF-577) Cannot Run WAR From Root Context

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022059#comment-13022059 ] 

Jean-Baptiste Onofré commented on KARAF-577:
--------------------------------------------

I'm gonna update to Pax Web 1.0.3-SNAPSHOT to see if the problem is really fixed.

> Cannot Run WAR From Root Context
> --------------------------------
>
>                 Key: KARAF-577
>                 URL: https://issues.apache.org/jira/browse/KARAF-577
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Tested on Ubuntu 10.10
>            Reporter: Adam Bird
>            Assignee: Achim Nierbeck
>             Fix For: 2.2.1
>
>
> Web applications do not appear to run in the root application context in Karaf 2.2.0 (this is not an issue in Karaf 2.1.4).  The problem is easily duplicated using the Tomcat sample WAR, as follows.
> 1. Run the following command from Karaf:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/anything
> 2. Access the app from your web browser (http://localhost:8181/anything/index.html)
> 3. Uninstall the sample bundle
> 4. Reinstall the bundle using the root context path with the following command:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/
> 5. Attempt to access the app from your web browser (http://localhost:8181/index.html)
> 6. Note the 404 error.
> Looking at the logs, it appears that when a web app is in the root application context, it prepends a "/default/" to any request.  For example, when trying to access /index.html it looks for /default/index.html, fails to find the page, and returns a not found error (see the log output below for more details).
> ----------------------------------------------------------------------
> LOG OUTPUT
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | REQUEST /index.html on org.eclipse.jetty.server.nio.SelectChannelConnector$3@693a1324
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  268 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Matching [/index.html]...
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  292 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Path [/index.html] matched to {pattern=/.*,model=ResourceModel{id=org.ops4j.pax.web.service.spi.model.ResourceModel-22,name=default,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/,alias=/,name=default},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-21,name=,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25,contextParams={webapp.context=}}}}
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | Got Session ID 17kb0ch4hv02w1ennfxju5owpw from cookie
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7d8aecf1
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | session=null
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet=default
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet holder=
> 15:14:46,271 | DEBUG | 30 - /index.html | HttpServiceContext               | etty.internal.HttpServiceContext  115 | 54 - org.ops4j.pax.web.pax-web-jetty - 1.0.1 | Handling request for [/index.html] using http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25]
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | chain=
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  113 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Searching bundle [tomcat-sample [97]] for resource [default/index.html], normalized to [default/index.html]
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  140 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Resource not found 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (KARAF-577) Cannot Run WAR From Root Context

Posted by "Achim Nierbeck (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Achim Nierbeck updated KARAF-577:
---------------------------------

    Fix Version/s: 2.2.1

let's see if we can get this fixed with 2.2.1 :)

> Cannot Run WAR From Root Context
> --------------------------------
>
>                 Key: KARAF-577
>                 URL: https://issues.apache.org/jira/browse/KARAF-577
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Tested on Ubuntu 10.10
>            Reporter: Adam Bird
>             Fix For: 2.2.1
>
>
> Web applications do not appear to run in the root application context in Karaf 2.2.0 (this is not an issue in Karaf 2.1.4).  The problem is easily duplicated using the Tomcat sample WAR, as follows.
> 1. Run the following command from Karaf:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/anything
> 2. Access the app from your web browser (http://localhost:8181/anything/index.html)
> 3. Uninstall the sample bundle
> 4. Reinstall the bundle using the root context path with the following command:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/
> 5. Attempt to access the app from your web browser (http://localhost:8181/index.html)
> 6. Note the 404 error.
> Looking at the logs, it appears that when a web app is in the root application context, it prepends a "/default/" to any request.  For example, when trying to access /index.html it looks for /default/index.html, fails to find the page, and returns a not found error (see the log output below for more details).
> ----------------------------------------------------------------------
> LOG OUTPUT
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | REQUEST /index.html on org.eclipse.jetty.server.nio.SelectChannelConnector$3@693a1324
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  268 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Matching [/index.html]...
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  292 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Path [/index.html] matched to {pattern=/.*,model=ResourceModel{id=org.ops4j.pax.web.service.spi.model.ResourceModel-22,name=default,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/,alias=/,name=default},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-21,name=,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25,contextParams={webapp.context=}}}}
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | Got Session ID 17kb0ch4hv02w1ennfxju5owpw from cookie
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7d8aecf1
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | session=null
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet=default
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet holder=
> 15:14:46,271 | DEBUG | 30 - /index.html | HttpServiceContext               | etty.internal.HttpServiceContext  115 | 54 - org.ops4j.pax.web.pax-web-jetty - 1.0.1 | Handling request for [/index.html] using http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25]
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | chain=
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  113 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Searching bundle [tomcat-sample [97]] for resource [default/index.html], normalized to [default/index.html]
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  140 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Resource not found 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (KARAF-577) Cannot Run WAR From Root Context

Posted by "Jamie goodyear (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jamie goodyear closed KARAF-577.
--------------------------------

    
> Cannot Run WAR From Root Context
> --------------------------------
>
>                 Key: KARAF-577
>                 URL: https://issues.apache.org/jira/browse/KARAF-577
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Tested on Ubuntu 10.10
>            Reporter: Adam Bird
>            Assignee: Achim Nierbeck
>             Fix For: 2.2.1
>
>
> Web applications do not appear to run in the root application context in Karaf 2.2.0 (this is not an issue in Karaf 2.1.4).  The problem is easily duplicated using the Tomcat sample WAR, as follows.
> 1. Run the following command from Karaf:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/anything
> 2. Access the app from your web browser (http://localhost:8181/anything/index.html)
> 3. Uninstall the sample bundle
> 4. Reinstall the bundle using the root context path with the following command:
> osgi:install -s webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/
> 5. Attempt to access the app from your web browser (http://localhost:8181/index.html)
> 6. Note the 404 error.
> Looking at the logs, it appears that when a web app is in the root application context, it prepends a "/default/" to any request.  For example, when trying to access /index.html it looks for /default/index.html, fails to find the page, and returns a not found error (see the log output below for more details).
> ----------------------------------------------------------------------
> LOG OUTPUT
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | REQUEST /index.html on org.eclipse.jetty.server.nio.SelectChannelConnector$3@693a1324
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  268 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Matching [/index.html]...
> 15:14:46,270 | DEBUG | 30 - /index.html | ServerModel                      | eb.service.spi.model.ServerModel  292 | 52 - org.ops4j.pax.web.pax-web-spi - 1.0.1 | Path [/index.html] matched to {pattern=/.*,model=ResourceModel{id=org.ops4j.pax.web.service.spi.model.ResourceModel-22,name=default,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/,alias=/,name=default},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-21,name=,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25,contextParams={webapp.context=}}}}
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | Got Session ID 17kb0ch4hv02w1ennfxju5owpw from cookie
> 15:14:46,270 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | sessionManager=org.eclipse.jetty.server.session.HashSessionManager@7d8aecf1
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | session=null
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet=default
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | servlet holder=
> 15:14:46,271 | DEBUG | 30 - /index.html | HttpServiceContext               | etty.internal.HttpServiceContext  115 | 54 - org.ops4j.pax.web.pax-web-jetty - 1.0.1 | Handling request for [/index.html] using http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@3942ef25]
> 15:14:46,271 | DEBUG | 30 - /index.html | log                              | .eclipse.jetty.util.log.Slf4jLog   70 | 43 - org.eclipse.jetty.util - 7.2.2.v20101205 | chain=
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  113 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Searching bundle [tomcat-sample [97]] for resource [default/index.html], normalized to [default/index.html]
> 15:14:46,272 | DEBUG | 30 - /index.html | WebAppWebContainerContext        | r.war.internal.WebAppHttpContext  140 | 64 - org.ops4j.pax.web.pax-web-extender-war - 1.0.1 | Resource not found 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira