You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by parker <pa...@yahoo.com> on 2014/07/08 23:01:10 UTC
Karaf 3.0.0 and deploying a war using the userguide
Hi
The user guide say : "You can note the webbundle prefix, and the
Bundle-SymbolicName and Web-ContextPath headers on the URL."
I dont understand what this mean, I have tried but that don't work with :
http://localhost:8181/sample/tomcat-sample/ or
http://localhost:8181/webbundle/sample/tomcat-sample/
Then what is the url ?
Thank you ,
source : in the user guide :
http://karaf.apache.org/manual/latest/users-guide/webcontainer.html
There is :
WAR (WebApplication aRchive)
Apache Karaf allows you to deploy directly WAR files without repackaging as
WAB.
Using the webbundle prefix and providing headers directly on the URL, Apache
Karaf creates a WAB "on the fly".
For instance, you can deploy the Apache Tomcat sample non-OSGi "classical"
WAR with the following command:
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"
You can note the webbundle prefix, and the Bundle-SymbolicName and
Web-ContextPath headers on the URL.
--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-0-and-deploying-a-war-using-the-userguide-tp4034070.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Karaf 3.0.0 and deploying a war using the userguide
Posted by Achim Nierbeck <bc...@googlemail.com>.
I'm not sure I follow your problem here.
Did you install the war according to the documentation.
Did you use the Web-ContextPath according to the documentation?
The path you defined in the Web-ContextPath is the path to your application
URL.
For more details on how to use WAB/WAR or HttpService can be found at the
Pax Web Project [1] and its samples [2]. The integration tests show how the
samples are used [3].
regards, Achim
[1] - https://ops4j1.jira.com/wiki/display/paxweb/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:17 GMT+02:00 parker <pa...@yahoo.com>:
> Hi
>
> Hi ,
>
> Thank you for your answer.
> I don't know why that don't work : http://localhost:8181/sample/
>
> tomcat-sample is deployed , I use chrome and linux and I have this message
> on http://localhost:8181/sample/ "HTTP ERROR 404
> Problem accessing /sample/. Reason:
> Not Found
> Powered by Jetty://
> "
>
>
> karaf@root()> web:list
> ID | State | Web-State | Level | Web-ContextPath | Name
>
> ----------------------------------------------------------------------------------------------------------
> 132 | Active | Deployed | 80 | /cave | Apache Karaf ::
> Cave :: Server :: HTTP (3.0.0)
> 133 | Active | Deployed | 80 | /sample | tomcat-sample
> (0)
> karaf@root()>
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Karaf-3-0-0-and-deploying-a-war-using-the-userguide-tp4034070p4034074.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
Re: Karaf 3.0.0 and deploying a war using the userguide
Posted by parker <pa...@yahoo.com>.
Hi
Hi ,
Thank you for your answer.
I don't know why that don't work : http://localhost:8181/sample/
tomcat-sample is deployed , I use chrome and linux and I have this message
on http://localhost:8181/sample/ "HTTP ERROR 404
Problem accessing /sample/. Reason:
Not Found
Powered by Jetty://
"
karaf@root()> web:list
ID | State | Web-State | Level | Web-ContextPath | Name
----------------------------------------------------------------------------------------------------------
132 | Active | Deployed | 80 | /cave | Apache Karaf ::
Cave :: Server :: HTTP (3.0.0)
133 | Active | Deployed | 80 | /sample | tomcat-sample
(0)
karaf@root()>
--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-0-and-deploying-a-war-using-the-userguide-tp4034070p4034074.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Karaf 3.0.0 and deploying a war using the userguide
Posted by Daniel McGreal <da...@redbite.com>.
Hi Parker,
The bundle:install command suggests maybe http://localhost:8181/sample/ would be the URL.
You can get information about deployed servlets and their URLs and states with the web:list command.
On 8 Jul 2014, at 22:01, parker <pa...@yahoo.com> wrote:
>
> Hi
>
> The user guide say : "You can note the webbundle prefix, and the
> Bundle-SymbolicName and Web-ContextPath headers on the URL."
> I dont understand what this mean, I have tried but that don't work with :
> http://localhost:8181/sample/tomcat-sample/ or
> http://localhost:8181/webbundle/sample/tomcat-sample/
>
>
> Then what is the url ?
>
> Thank you ,
>
>
>
> source : in the user guide :
> http://karaf.apache.org/manual/latest/users-guide/webcontainer.html
>
> There is :
>
> WAR (WebApplication aRchive)
> Apache Karaf allows you to deploy directly WAR files without repackaging as
> WAB.
>
> Using the webbundle prefix and providing headers directly on the URL, Apache
> Karaf creates a WAB "on the fly".
>
> For instance, you can deploy the Apache Tomcat sample non-OSGi "classical"
> WAR with the following command:
>
> 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"
> You can note the webbundle prefix, and the Bundle-SymbolicName and
> Web-ContextPath headers on the URL.
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-3-0-0-and-deploying-a-war-using-the-userguide-tp4034070.html
> Sent from the Karaf - User mailing list archive at Nabble.com.