Looks a lot like the given web application doesn't contain a welcome-file
entry in its web.xml,
after installing and issueing web:list + http:list

karaf@root()> web
web          web:list     web:start    web:stop
karaf@root()> web:list
ID  | State       | Web-State   | Level | Web-ContextPath | Name
-----------------------------------------------------------------------------
103 | Active      | Deployed    | 80    | /sample         | tomcat-sample
(0)
karaf@root()> http
http         http:list
karaf@root()> http:list
ID  | Servlet           | Servlet-Name | State       | Alias | Url
---------------------------------------------------------------------------------------------------------------------------
103 | JspServletWrapper | jsp          | Deployed    |       | [*.jsp,
*.jspx, *.jspf, *.xsp, *.JSP, *.JSPX, *.JSPF, *.XSP]
103 | ResourceServlet   | default      | Deployed    | /     | [/]
103 |                   | HelloServlet | Deployed    |       | [/hello]
karaf@root()>

I've seen you need to call
http://localhost:8181/sample/hello

which works right away.

If you take a look at the Pax Web project at [1] you're gonna see there are
a lot of samples [2] to use with Karaf / Pax Web available. All of those
samples are also actually used in the integration tests [3], so in case of
worrying on how to use a quick check there will help.

regards, Achim

[1] - https://github.com/ops4j/org.ops4j.pax.web
[2] - https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples
[3] -
https://github.com/ops4j/org.ops4j.pax.web/tree/master/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty/src/test/java/org/ops4j/pax/web/itest/jetty



2014-07-09 0:37 GMT+02:00 parker <[email protected]>:

> firstly I clean the data folder of karaf and i do ./karaf -c -clean
> secondly :
> I do that :
> karaf@root()> bundle:install -s
> "webbundle:
> http://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Web-ContextPath=/sample
> "
> Bundle ID: 114
> karaf@root()>
>
> karaf@root()> web:list
> ID  | State       | Web-State   | Level | Web-ContextPath | Name
>
> -----------------------------------------------------------------------------
> 114 | Active      | Deployed    | 80    | /sample         | tomcat-sample
> (0)
> karaf@root()>
>
>
>
> but in http://localhost:8181/sample/ i have :
> HTTP ERROR 404
> Problem accessing /sample/. Reason:
>     Not Found
> Powered by Jetty://
>
>
> I don't  understand why it's not working.
>
>
> Thank you for your advice.
>
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/deploy-a-war-web-project-on-karaf-don-t-work-tp4034063p4034075.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Reply via email to