Reputation: 11
I can install a war but not to test it , why ????
From Karaf tuto I have done :
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: 150 karaf@root()> list |grep tom 150 | Active | 80 | 0 | tomcat-sample
karaf@root()> web:list
ID | State | Web-State | Level | Web-ContextPath | Name
123 | Active | Deployed | 80 | /sample | tomcat-sample (0)
When I go to [http://loxcalhost:8181/sample] it's not working , why ???
Upvotes: 0
Views: 654
Reputation: 5285
The sample war doesn't contain a welcome section in it's web.xml and therefore nothing happens if you call localhost:8181/sample you have to go for localhost:8181/sample/hello as that's the registered servlet for this web-application. If you issue a http:list command you'll get the following listing:
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]
Upvotes: 2