Home » Eclipse Projects » Equinox » re: Deploying servlet on a tomcat
re: Deploying servlet on a tomcat [message #69673] |
Wed, 12 July 2006 01:39  |
Eclipse User |
|
|
|
Originally posted by: skaegi.sympatico.ca
Hi Khawaja,
It sounds like you have everything deployed correctly. If you deployed the
webapp overtop of an existing install it's a good idea to "sp_clean" your
environment.
In terms of next steps... by default the "console" is launched which you can
use to verify that everything is installed and started correctly. I'd spend
some time learning the console commands as they're invaluable when tracking
down problems.
All requests are proxied through the BridgeServlet. You can access the
servlet and resource registered by the "sample.http" bundle at "/helloworld"
and "/helloworld.html" relative to the context where you installed the war.
e.g. http://localhost:8080/bridge/helloworld
If you're using "sample.http.registry" try "/ext/helloworld" and
"/ext/helloworld.html" again prefixed by your ServletContext path.
Hope this helps.
-Simon
------------------------------------------------------------ ----------------
--
From: equinox-dev-bounces@eclipse.org
[mailto:equinox-dev-bounces@eclipse.org] On Behalf Of Khawaja Shams
Sent: Tuesday, July 11, 2006 8:33 PM
To: Equinox development mailing list
Subject: [equinox-dev] Deploying servlet on a tomcat
Hello,
I was able to deploy my servlet on the osgi framework within Eclipse,
and all the needed services worked fine. My next step is to deploy this
project on our production tomcat instance. I am looking at the following
guide:
http://www.eclipse.org/equinox/incubator/server/embedding_in _a_servlet_container.php
I have deployed bridge.war, and the sp_test context shows that the bridge
is deployed successfully. I have also downloaded the sample applications.
I followed the instructions on the build process section, and I have the
following directory structure:
RangeMapServle/t
WEB-INF/
web.xml (same as sample web application)
lib/
servlet-bridge.jar
platform/
plugins/
all my dependent plugins along with everything in
this folder of the sample web application (without registry)
features/
feature.xml (same as the sample application + my
bundle added to the description)
configuration/
config.ini (same as sample + an @start for my
bundle
launch.ini
I am curious what the next step should be. I tried creating a war archive
and placing it in tomcat's webapp directory. Tomcat's log shows an attempt
to deploy the application as well. However, I am not sure if properly
deployed or not. Moreover, how would I access the servlet? Would it be
accessed through the bridge servlet? If there are any instructions on how to
access the sample application once deployed, I would like to see them. I
ran the WebAppBuilder.xml script in the launcher, and I saw the directory
structure. However, I am still unsure of how to deploy the application. I
would sincerely appreciate any help.
Regards,
Khawaja
|
|
|
Re: Deploying servlet on a tomcat [message #69713 is a reply to message #69673] |
Wed, 12 July 2006 15:14   |
Eclipse User |
|
|
|
Originally posted by: ksshams.gmail.com
Hello,
Thank you Simon for your help so far.
1) Where is the console launched? When I start tomcat, I see the osgi
prompt as part of the logs, but I am not sure how to execute commands on
it.
2) I am not sure I see an sp_clean option in the bridge servlet. I
tried it, and it did not work. Does sp_redeploy result in similar
functionality?
Currently, when I deploy the servlet, I cannot access the helloworld
application. I am hitting the url:
http://localhost:8080/bridge/helloworld
I am attaching my bridge folder as a zipped archived. Can anyone give
me some pointers on where I am going wrong? I am placing the
unarchived folder in the webapps folder of tomcat5.5.17. Thank you for
your time and help.
Regards,
Khawaja
Simon Kaegi wrote:
> Hi Khawaja,
>
> It sounds like you have everything deployed correctly. If you deployed the
> webapp overtop of an existing install it's a good idea to "sp_clean" your
> environment.
>
> In terms of next steps... by default the "console" is launched which you can
> use to verify that everything is installed and started correctly. I'd spend
> some time learning the console commands as they're invaluable when tracking
> down problems.
>
> All requests are proxied through the BridgeServlet. You can access the
> servlet and resource registered by the "sample.http" bundle at "/helloworld"
> and "/helloworld.html" relative to the context where you installed the war.
> e.g. http://localhost:8080/bridge/helloworld
>
> If you're using "sample.http.registry" try "/ext/helloworld" and
> "/ext/helloworld.html" again prefixed by your ServletContext path.
>
> Hope this helps.
> -Simon
>
>
>
>
> ------------------------------------------------------------ ----------------
> --
> From: equinox-dev-bounces@eclipse.org
> [mailto:equinox-dev-bounces@eclipse.org] On Behalf Of Khawaja Shams
> Sent: Tuesday, July 11, 2006 8:33 PM
> To: Equinox development mailing list
> Subject: [equinox-dev] Deploying servlet on a tomcat
>
>
> Hello,
> I was able to deploy my servlet on the osgi framework within Eclipse,
> and all the needed services worked fine. My next step is to deploy this
> project on our production tomcat instance. I am looking at the following
> guide:
>
> http://www.eclipse.org/equinox/incubator/server/embedding_in _a_servlet_container.php
>
> I have deployed bridge.war, and the sp_test context shows that the bridge
> is deployed successfully. I have also downloaded the sample applications.
> I followed the instructions on the build process section, and I have the
> following directory structure:
>
> RangeMapServle/t
> WEB-INF/
> web.xml (same as sample web application)
> lib/
> servlet-bridge.jar
> platform/
> plugins/
> all my dependent plugins along with everything in
> this folder of the sample web application (without registry)
> features/
> feature.xml (same as the sample application + my
> bundle added to the description)
> configuration/
> config.ini (same as sample + an @start for my
> bundle
> launch.ini
>
>
>
> I am curious what the next step should be. I tried creating a war archive
> and placing it in tomcat's webapp directory. Tomcat's log shows an attempt
> to deploy the application as well. However, I am not sure if properly
> deployed or not. Moreover, how would I access the servlet? Would it be
> accessed through the bridge servlet? If there are any instructions on how to
> access the sample application once deployed, I would like to see them. I
> ran the WebAppBuilder.xml script in the launcher, and I saw the directory
> structure. However, I am still unsure of how to deploy the application. I
> would sincerely appreciate any help.
>
>
> Regards,
> Khawaja
>
>
|
|
|
Re: Deploying servlet on a tomcat [message #69734 is a reply to message #69713] |
Wed, 12 July 2006 15:18   |
Eclipse User |
|
|
|
Originally posted by: ksshams.gmail.com
This is a multi-part message in MIME format.
--------------010208060401020007060707
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
My attachment was too big, so it did not go through. Here are the
vital files. Also, here is a listing of what is in the plugin directory:
org.eclipse.equinox.common_3.2.0.v20060603.jar
org.eclipse.equinox.http.registry_3.2.0.200607121155.jar
org.eclipse.equinox.registry_3.2.0.v20060601.jar
org.eclipse.equinox.servlet.api_1.0.0.v20060601.jar
org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
org.eclipse.equinox.servlet.bridge.http_3.2.0.200607121155.j ar
org.eclipse.osgi.services_3.1.100.v20060601.jar
org.eclipse.osgi_3.2.0.v20060601.jar
org.eclipse.update.configurator_3.2.0.v20060511.jar
sample.http_1.0.0.jar
Thanks again.
Khawaja
Khawaja Shams wrote:
> Hello,
>
>
> Thank you Simon for your help so far.
>
> 1) Where is the console launched? When I start tomcat, I see the osgi
> prompt as part of the logs, but I am not sure how to execute commands on
> it.
>
>
>
> 2) I am not sure I see an sp_clean option in the bridge servlet. I
> tried it, and it did not work. Does sp_redeploy result in similar
> functionality?
>
>
> Currently, when I deploy the servlet, I cannot access the helloworld
> application. I am hitting the url:
> http://localhost:8080/bridge/helloworld
>
> I am attaching my bridge folder as a zipped archived. Can anyone give
> me some pointers on where I am going wrong? I am placing the
> unarchived folder in the webapps folder of tomcat5.5.17. Thank you for
> your time and help.
>
> Regards,
> Khawaja
>
> Simon Kaegi wrote:
>
>> Hi Khawaja,
>>
>> It sounds like you have everything deployed correctly. If you deployed
>> the
>> webapp overtop of an existing install it's a good idea to "sp_clean" your
>> environment.
>>
>> In terms of next steps... by default the "console" is launched which
>> you can
>> use to verify that everything is installed and started correctly. I'd
>> spend
>> some time learning the console commands as they're invaluable when
>> tracking
>> down problems.
>>
>> All requests are proxied through the BridgeServlet. You can access the
>> servlet and resource registered by the "sample.http" bundle at
>> "/helloworld"
>> and "/helloworld.html" relative to the context where you installed the
>> war.
>> e.g. http://localhost:8080/bridge/helloworld
>>
>> If you're using "sample.http.registry" try "/ext/helloworld" and
>> "/ext/helloworld.html" again prefixed by your ServletContext path.
>>
>> Hope this helps.
>> -Simon
>>
>>
>>
>>
>> ------------------------------------------------------------ ----------------
>>
>> --
>> From: equinox-dev-bounces@eclipse.org
>> [mailto:equinox-dev-bounces@eclipse.org] On Behalf Of Khawaja Shams
>> Sent: Tuesday, July 11, 2006 8:33 PM
>> To: Equinox development mailing list
>> Subject: [equinox-dev] Deploying servlet on a tomcat
>>
>>
>> Hello,
>> I was able to deploy my servlet on the osgi framework within
>> Eclipse,
>> and all the needed services worked fine. My next step is to deploy this
>> project on our production tomcat instance. I am looking at the following
>> guide:
>>
>> http://www.eclipse.org/equinox/incubator/server/embedding_in _a_servlet_container.php
>>
>>
>> I have deployed bridge.war, and the sp_test context shows that the
>> bridge
>> is deployed successfully. I have also downloaded the sample
>> applications.
>> I followed the instructions on the build process section, and I have the
>> following directory structure:
>>
>> RangeMapServle/t
>> WEB-INF/
>> web.xml (same as sample web application)
>> lib/
>> servlet-bridge.jar
>> platform/
>> plugins/
>> all my dependent plugins along with
>> everything in
>> this folder of the sample web application (without registry)
>> features/
>> feature.xml (same as the sample application + my
>> bundle added to the description)
>> configuration/
>> config.ini (same as sample + an @start for my
>> bundle
>> launch.ini
>>
>>
>>
>> I am curious what the next step should be. I tried creating a war
>> archive
>> and placing it in tomcat's webapp directory. Tomcat's log shows an
>> attempt
>> to deploy the application as well. However, I am not sure if properly
>> deployed or not. Moreover, how would I access the servlet? Would it be
>> accessed through the bridge servlet? If there are any instructions on
>> how to
>> access the sample application once deployed, I would like to see them. I
>> ran the WebAppBuilder.xml script in the launcher, and I saw the directory
>> structure. However, I am still unsure of how to deploy the
>> application. I
>> would sincerely appreciate any help.
>>
>>
>> Regards,
>> Khawaja
>>
>>
--------------010208060401020007060707
Content-Type: text/xml;
name="feature.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="feature.xml"
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.eclipse.equinox.servlet.bridge.feature"
label="org.eclipse.equinox.servlet.bridge.feature"
version="1.0.0">
<description>
Servlet Bridge Feature
</description>
<copyright>
2006 Eclipse Foundation and others.
</copyright>
<license url="http://www.eclipse.org/legal/epl-v10.html">
ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT
</license>
<requires>
<import plugin="org.eclipse.equinox.common" version="3.2.0" match="compatible"/>
<import plugin="org.eclipse.core.jobs"/>
<import plugin="org.eclipse.osgi" version="3.2.0" match="compatible"/>
<import plugin="org.eclipse.equinox.servlet.bridge.launcher"/>
</requires>
<plugin
id="org.eclipse.osgi"
download-size="0"
install-size="0"
version="3.2.0.v20060601"
unpack="false"/>
<plugin
id="org.eclipse.osgi.services"
download-size="0"
install-size="0"
version="3.1.100.v20060601"
unpack="false"/>
<plugin
id="org.eclipse.equinox.common"
download-size="0"
install-size="0"
version="3.2.0.v20060603"
unpack="false"/>
<plugin
id="org.eclipse.equinox.registry"
download-size="0"
install-size="0"
version="3.2.0.v20060601"
unpack="false"/>
<plugin
id="org.eclipse.update.configurator"
download-size="0"
install-size="0"
version="3.2.0.v20060511"
unpack="false"/>
<plugin
id="org.eclipse.equinox.http.registry"
download-size="0"
install-size="0"
version="3.2.0.200607121155"
unpack="false"/>
<plugin
id="org.eclipse.equinox.servlet.bridge.http"
download-size="0"
install-size="0"
version="3.2.0.200607121155"
unpack="false"/>
<plugin
id="org.eclipse.equinox.servlet.api"
download-size="0"
install-size="0"
version="1.0.0.v20060601"
unpack="false"/>
<plugin
id="sample.http"
download-size="0"
install-size="0"
version="1.0.0"
unpack="false"/>
</feature>
--------------010208060401020007060707
Content-Type: text/plain;
name="config.ini"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="config.ini"
#Eclipse Runtime Configuration File
osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@start, org.eclipse.equinox.servlet.bridge.http@start, org.eclipse.equinox.http.registry@start
osgi.bundles.defaultStartLevel=4
--------------010208060401020007060707
Content-Type: text/xml;
name="web.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="web.xml"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp">
<servlet id="bridge">
<servlet-name>equinoxbridgeservlet</servlet-name>
<display-name>Equinox Bridge Servlet</display-name>
<description>Equinox Bridge Servlet</description>
<servlet-class>org.eclipse.equinox.servlet.bridge.launcher.BridgeServlet </servlet-class>
<init-param>
<param-name>commandline</param-name>
<param-value>-console</param-value>
</init-param>
<init-param>
<param-name>enableFrameworkControls</param-name>
<param-value>true</param-value>
</init-param>
<!--
You can specify your own framework launcher here.
The default is: org.eclipse.equinox.servlet.bridge.launcher.FrameworkLaunche r
<init-param>
<param-name>frameworkLauncherClass</param-name>
<param-value> org.eclipse.equinox.servlet.bridge.launcher.FrameworkLaunche r </param-value>
</init-param>
-->
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>equinoxbridgeservlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
--------------010208060401020007060707--
|
|
|
Re: Deploying servlet on a tomcat [message #69753 is a reply to message #69734] |
Wed, 12 July 2006 23:08   |
Eclipse User |
|
|
|
Originally posted by: skaegi.sympatico.ca
Hi Khawaja,
It looks like everything is there but my guess is that the problem is that
the sample.http bundle is not started.
You can add sample.http@start in your config.ini to have the bundle
automatically started or else use the console to manually start it.
I've included a config.ini and feature.xml that I put together for this
purpose. (less fancy than your feature.xml but notice that the servlet.api
bundle is not packaged in the war file as the servlet container will supply
it)
Here is the result of an "ss" from the console.
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE system.bundle_3.2.0.v20060601
Fragments=8
1 ACTIVE org.eclipse.equinox.common_3.2.0.v20060603
2 ACTIVE org.eclipse.update.configurator_3.2.0.v20060605
3 ACTIVE
org.eclipse.equinox.servlet.bridge.http_3.2.0.200607122227
4 ACTIVE org.eclipse.equinox.http.registry_3.2.0.200607122227
7 ACTIVE org.eclipse.equinox.registry_3.2.0.v20060601
8 RESOLVED org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
Master=0
10 RESOLVED org.eclipse.osgi.services_3.1.100.v20060601
13 ACTIVE sample.http_1.0.0
Speaking of which...
> 1) Where is the console launched? When I start tomcat, I see the osgi
> prompt as part of the logs, but I am not sure how to execute commands on
> it.
By default the console is launched using stdin/stdout. If you launch tomcat
from the command e.g. "bin/startup.bat" you can use the console directly.
Keep in mind that the console is more a dev tool useful to get a feel for
things. Type "help" for console commands. "ss" is particularly useful ;)
Once you've got the basics nailed down you might want to take a look at the
http-console packaged at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=122911
> 2) I am not sure I see an sp_clean option in the bridge servlet. I
> tried it, and it did not work. Does sp_redeploy result in similar
> functionality?
Yes, you're right sp_clean was an old command that eventually became
sp_undeploy. sp_redeploy will give you the desired result.
GL
-Simon
"Khawaja Shams" <ksshams@gmail.com> wrote in message
news:e93hu9$fnj$1@utils.eclipse.org...
> Hello,
> My attachment was too big, so it did not go through. Here are the
> vital files. Also, here is a listing of what is in the plugin directory:
> org.eclipse.equinox.common_3.2.0.v20060603.jar
> org.eclipse.equinox.http.registry_3.2.0.200607121155.jar
> org.eclipse.equinox.registry_3.2.0.v20060601.jar
> org.eclipse.equinox.servlet.api_1.0.0.v20060601.jar
> org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
> org.eclipse.equinox.servlet.bridge.http_3.2.0.200607121155.j ar
> org.eclipse.osgi.services_3.1.100.v20060601.jar
> org.eclipse.osgi_3.2.0.v20060601.jar
> org.eclipse.update.configurator_3.2.0.v20060511.jar
> sample.http_1.0.0.jar
>
>
> Thanks again.
>
> Khawaja
>
> Khawaja Shams wrote:
> > Hello,
> >
> >
> > Thank you Simon for your help so far.
> >
> > 1) Where is the console launched? When I start tomcat, I see the osgi
> > prompt as part of the logs, but I am not sure how to execute commands on
> > it.
> >
> >
> >
> > 2) I am not sure I see an sp_clean option in the bridge servlet. I
> > tried it, and it did not work. Does sp_redeploy result in similar
> > functionality?
> >
> >
> > Currently, when I deploy the servlet, I cannot access the helloworld
> > application. I am hitting the url:
> > http://localhost:8080/bridge/helloworld
> >
> > I am attaching my bridge folder as a zipped archived. Can anyone give
> > me some pointers on where I am going wrong? I am placing the
> > unarchived folder in the webapps folder of tomcat5.5.17. Thank you for
> > your time and help.
> >
> > Regards,
> > Khawaja
> >
> > Simon Kaegi wrote:
> >
> >> Hi Khawaja,
> >>
> >> It sounds like you have everything deployed correctly. If you deployed
> >> the
> >> webapp overtop of an existing install it's a good idea to "sp_clean"
your
> >> environment.
> >>
> >> In terms of next steps... by default the "console" is launched which
> >> you can
> >> use to verify that everything is installed and started correctly. I'd
> >> spend
> >> some time learning the console commands as they're invaluable when
> >> tracking
> >> down problems.
> >>
> >> All requests are proxied through the BridgeServlet. You can access the
> >> servlet and resource registered by the "sample.http" bundle at
> >> "/helloworld"
> >> and "/helloworld.html" relative to the context where you installed the
> >> war.
> >> e.g. http://localhost:8080/bridge/helloworld
> >>
> >> If you're using "sample.http.registry" try "/ext/helloworld" and
> >> "/ext/helloworld.html" again prefixed by your ServletContext path.
> >>
> >> Hope this helps.
> >> -Simon
> >>
> >>
> >>
> >>
>
>> ------------------------------------------------------------ -------------
---
> >>
> >> --
> >> From: equinox-dev-bounces@eclipse.org
> >> [mailto:equinox-dev-bounces@eclipse.org] On Behalf Of Khawaja Shams
> >> Sent: Tuesday, July 11, 2006 8:33 PM
> >> To: Equinox development mailing list
> >> Subject: [equinox-dev] Deploying servlet on a tomcat
> >>
> >>
> >> Hello,
> >> I was able to deploy my servlet on the osgi framework within
> >> Eclipse,
> >> and all the needed services worked fine. My next step is to deploy
this
> >> project on our production tomcat instance. I am looking at the
following
> >> guide:
> >>
> >>
http://www.eclipse.org/equinox/incubator/server/embedding_in _a_servlet_container.php
> >>
> >>
> >> I have deployed bridge.war, and the sp_test context shows that the
> >> bridge
> >> is deployed successfully. I have also downloaded the sample
> >> applications.
> >> I followed the instructions on the build process section, and I have
the
> >> following directory structure:
> >>
> >> RangeMapServle/t
> >> WEB-INF/
> >> web.xml (same as sample web application)
> >> lib/
> >> servlet-bridge.jar
> >> platform/
> >> plugins/
> >> all my dependent plugins along with
> >> everything in
> >> this folder of the sample web application (without registry)
> >> features/
> >> feature.xml (same as the sample application +
my
> >> bundle added to the description)
> >> configuration/
> >> config.ini (same as sample + an @start for my
> >> bundle
> >> launch.ini
> >>
> >>
> >>
> >> I am curious what the next step should be. I tried creating a war
> >> archive
> >> and placing it in tomcat's webapp directory. Tomcat's log shows an
> >> attempt
> >> to deploy the application as well. However, I am not sure if properly
> >> deployed or not. Moreover, how would I access the servlet? Would it be
> >> accessed through the bridge servlet? If there are any instructions on
> >> how to
> >> access the sample application once deployed, I would like to see them.
I
> >> ran the WebAppBuilder.xml script in the launcher, and I saw the
directory
> >> structure. However, I am still unsure of how to deploy the
> >> application. I
> >> would sincerely appreciate any help.
> >>
> >>
> >> Regards,
> >> Khawaja
> >>
> >>
>
>
------------------------------------------------------------ ----------------
----
> <?xml version="1.0" encoding="UTF-8"?>
> <feature
> id="org.eclipse.equinox.servlet.bridge.feature"
> label="org.eclipse.equinox.servlet.bridge.feature"
> version="1.0.0">
>
> <description>
> Servlet Bridge Feature
> </description>
>
> <copyright>
> 2006 Eclipse Foundation and others.
> </copyright>
>
> <license url="http://www.eclipse.org/legal/epl-v10.html">
> ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT
> </license>
>
> <requires>
> <import plugin="org.eclipse.equinox.common" version="3.2.0"
match="compatible"/>
> <import plugin="org.eclipse.core.jobs"/>
> <import plugin="org.eclipse.osgi" version="3.2.0"
match="compatible"/>
> <import plugin="org.eclipse.equinox.servlet.bridge.launcher"/>
> </requires>
>
> <plugin
> id="org.eclipse.osgi"
> download-size="0"
> install-size="0"
> version="3.2.0.v20060601"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.osgi.services"
> download-size="0"
> install-size="0"
> version="3.1.100.v20060601"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.common"
> download-size="0"
> install-size="0"
> version="3.2.0.v20060603"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.registry"
> download-size="0"
> install-size="0"
> version="3.2.0.v20060601"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.update.configurator"
> download-size="0"
> install-size="0"
> version="3.2.0.v20060511"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.http.registry"
> download-size="0"
> install-size="0"
> version="3.2.0.200607121155"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.servlet.bridge.http"
> download-size="0"
> install-size="0"
> version="3.2.0.200607121155"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.servlet.api"
> download-size="0"
> install-size="0"
> version="1.0.0.v20060601"
> unpack="false"/>
>
> <plugin
> id="sample.http"
> download-size="0"
> install-size="0"
> version="1.0.0"
> unpack="false"/>
>
> </feature>
>
------------------------------------------------------------ ----------------
----
> #Eclipse Runtime Configuration File
> osgi.bundles=org.eclipse.equinox.common@2:start,
org.eclipse.update.configurator@start,
org.eclipse.equinox.servlet.bridge.http@start,
org.eclipse.equinox.http.registry@start
> osgi.bundles.defaultStartLevel=4
>
------------------------------------------------------------ ----------------
----
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> <web-app id="WebApp">
> <servlet id="bridge">
> <servlet-name>equinoxbridgeservlet</servlet-name>
> <display-name>Equinox Bridge Servlet</display-name>
> <description>Equinox Bridge Servlet</description>
>
<servlet-class>org.eclipse.equinox.servlet.bridge.launcher.BridgeServlet </se
rvlet-class>
> <init-param>
> <param-name>commandline</param-name>
> <param-value>-console</param-value>
> </init-param>
> <init-param>
> <param-name>enableFrameworkControls</param-name>
> <param-value>true</param-value>
> </init-param>
> <!--
> You can specify your own framework launcher here.
> The default is:
org.eclipse.equinox.servlet.bridge.launcher.FrameworkLaunche r
> <init-param>
> <param-name>frameworkLauncherClass</param-name>
>
<param-value> org.eclipse.equinox.servlet.bridge.launcher.FrameworkLaunche r </
param-value>
> </init-param>
> -->
> <load-on-startup>1</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>equinoxbridgeservlet</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
> </web-app>
>
Attachment: config.ini
(Size: 0.26KB, Downloaded 189 times)
Attachment: feature.xml
(Size: 1.82KB, Downloaded 435 times)
|
|
|
Re: Deploying servlet on a tomcat [message #70956 is a reply to message #69753] |
Wed, 26 July 2006 14:49   |
Eclipse User |
|
|
|
Originally posted by: ksshams.gmail.com
Hello again,
Thank you for all your help so far. Our servlet is up and running
on tomcat without any problems (on a windows machine). I have a few
more questions.
1) When I start tomcat on windows, a new window pops up with the logs
and has an osgi prompt. However, this is not the case for a linux (when
I start tomcat using startup.sh). All the logs are being directed to
catalina.out, and I can see the osgi prompt inside the file.
2) Are there any instructions on using the http-console bundle? I tried
using it by putting in my platform/plugins folder and added an @start
for this bundle in my config.ini file. However, I cannot see anything
when I go to http://localhost:8080/bridge/console. Is there anything
that I am missing?
Thanks in advance.
Regards,
Khawaja Shams
Simon Kaegi wrote:
> Hi Khawaja,
>
> It looks like everything is there but my guess is that the problem is that
> the sample.http bundle is not started.
> You can add sample.http@start in your config.ini to have the bundle
> automatically started or else use the console to manually start it.
>
> I've included a config.ini and feature.xml that I put together for this
> purpose. (less fancy than your feature.xml but notice that the servlet.api
> bundle is not packaged in the war file as the servlet container will supply
> it)
>
> Here is the result of an "ss" from the console.
> osgi> ss
>
> Framework is launched.
>
> id State Bundle
> 0 ACTIVE system.bundle_3.2.0.v20060601
> Fragments=8
> 1 ACTIVE org.eclipse.equinox.common_3.2.0.v20060603
> 2 ACTIVE org.eclipse.update.configurator_3.2.0.v20060605
> 3 ACTIVE
> org.eclipse.equinox.servlet.bridge.http_3.2.0.200607122227
> 4 ACTIVE org.eclipse.equinox.http.registry_3.2.0.200607122227
> 7 ACTIVE org.eclipse.equinox.registry_3.2.0.v20060601
> 8 RESOLVED org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
> Master=0
> 10 RESOLVED org.eclipse.osgi.services_3.1.100.v20060601
> 13 ACTIVE sample.http_1.0.0
>
> Speaking of which...
>
>>1) Where is the console launched? When I start tomcat, I see the osgi
>>prompt as part of the logs, but I am not sure how to execute commands on
>>it.
>
> By default the console is launched using stdin/stdout. If you launch tomcat
> from the command e.g. "bin/startup.bat" you can use the console directly.
> Keep in mind that the console is more a dev tool useful to get a feel for
> things. Type "help" for console commands. "ss" is particularly useful ;)
>
> Once you've got the basics nailed down you might want to take a look at the
> http-console packaged at
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=122911
>
>
>>2) I am not sure I see an sp_clean option in the bridge servlet. I
>>tried it, and it did not work. Does sp_redeploy result in similar
>>functionality?
>
> Yes, you're right sp_clean was an old command that eventually became
> sp_undeploy. sp_redeploy will give you the desired result.
>
> GL
> -Simon
>
> "Khawaja Shams" <ksshams@gmail.com> wrote in message
> news:e93hu9$fnj$1@utils.eclipse.org...
>
>>Hello,
>> My attachment was too big, so it did not go through. Here are the
>>vital files. Also, here is a listing of what is in the plugin directory:
>>org.eclipse.equinox.common_3.2.0.v20060603.jar
>>org.eclipse.equinox.http.registry_3.2.0.200607121155.jar
>>org.eclipse.equinox.registry_3.2.0.v20060601.jar
>>org.eclipse.equinox.servlet.api_1.0.0.v20060601.jar
>>org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
>> org.eclipse.equinox.servlet.bridge.http_3.2.0.200607121155.j ar
>>org.eclipse.osgi.services_3.1.100.v20060601.jar
>>org.eclipse.osgi_3.2.0.v20060601.jar
>>org.eclipse.update.configurator_3.2.0.v20060511.jar
>>sample.http_1.0.0.jar
>>
>>
>>Thanks again.
>>
>>Khawaja
>>
>>Khawaja Shams wrote:
>>
>>>Hello,
>>>
>>>
>>> Thank you Simon for your help so far.
>>>
>>>1) Where is the console launched? When I start tomcat, I see the osgi
>>>prompt as part of the logs, but I am not sure how to execute commands on
>>>it.
>>>
>>>
>>>
>>>2) I am not sure I see an sp_clean option in the bridge servlet. I
>>>tried it, and it did not work. Does sp_redeploy result in similar
>>>functionality?
>>>
>>>
>>>Currently, when I deploy the servlet, I cannot access the helloworld
>>>application. I am hitting the url:
>>>http://localhost:8080/bridge/helloworld
>>>
>>>I am attaching my bridge folder as a zipped archived. Can anyone give
>>>me some pointers on where I am going wrong? I am placing the
>>>unarchived folder in the webapps folder of tomcat5.5.17. Thank you for
>>>your time and help.
>>>
>>>Regards,
>>>Khawaja
>>>
>>>Simon Kaegi wrote:
>>>
>>>
>>>>Hi Khawaja,
>>>>
>>>>It sounds like you have everything deployed correctly. If you deployed
>>>>the
>>>>webapp overtop of an existing install it's a good idea to "sp_clean"
>
> your
>
>>>>environment.
>>>>
>>>>In terms of next steps... by default the "console" is launched which
>>>>you can
>>>>use to verify that everything is installed and started correctly. I'd
>>>>spend
>>>>some time learning the console commands as they're invaluable when
>>>>tracking
>>>>down problems.
>>>>
>>>>All requests are proxied through the BridgeServlet. You can access the
>>>>servlet and resource registered by the "sample.http" bundle at
>>>>"/helloworld"
>>>>and "/helloworld.html" relative to the context where you installed the
>>>>war.
>>>>e.g. http://localhost:8080/bridge/helloworld
>>>>
>>>> If you're using "sample.http.registry" try "/ext/helloworld" and
>>>>"/ext/helloworld.html" again prefixed by your ServletContext path.
>>>>
>>>>Hope this helps.
>>>>-Simon
>>>>
>>>>
>>>>
>>>>
>>
>>> ------------------------------------------------------------ -------------
>
> ---
>
>>>>--
>>>> From: equinox-dev-bounces@eclipse.org
>>>>[mailto:equinox-dev-bounces@eclipse.org] On Behalf Of Khawaja Shams
>>>> Sent: Tuesday, July 11, 2006 8:33 PM
>>>> To: Equinox development mailing list
>>>> Subject: [equinox-dev] Deploying servlet on a tomcat
>>>>
>>>>
>>>> Hello,
>>>> I was able to deploy my servlet on the osgi framework within
>>>>Eclipse,
>>>>and all the needed services worked fine. My next step is to deploy
>
> this
>
>>>>project on our production tomcat instance. I am looking at the
>
> following
>
>>>>guide:
>>>>
>>>>
>
> http://www.eclipse.org/equinox/incubator/server/embedding_in _a_servlet_container.php
>
>>>>
>>>> I have deployed bridge.war, and the sp_test context shows that the
>>>>bridge
>>>>is deployed successfully. I have also downloaded the sample
>>>>applications.
>>>>I followed the instructions on the build process section, and I have
>
> the
>
>>>>following directory structure:
>>>>
>>>> RangeMapServle/t
>>>> WEB-INF/
>>>> web.xml (same as sample web application)
>>>> lib/
>>>> servlet-bridge.jar
>>>> platform/
>>>> plugins/
>>>> all my dependent plugins along with
>>>>everything in
>>>>this folder of the sample web application (without registry)
>>>> features/
>>>> feature.xml (same as the sample application +
>
> my
>
>>>>bundle added to the description)
>>>> configuration/
>>>> config.ini (same as sample + an @start for my
>>>>bundle
>>>> launch.ini
>>>>
>>>>
>>>>
>>>> I am curious what the next step should be. I tried creating a war
>>>>archive
>>>>and placing it in tomcat's webapp directory. Tomcat's log shows an
>>>>attempt
>>>>to deploy the application as well. However, I am not sure if properly
>>>>deployed or not. Moreover, how would I access the servlet? Would it be
>>>>accessed through the bridge servlet? If there are any instructions on
>>>>how to
>>>>access the sample application once deployed, I would like to see them.
>
> I
>
>>>>ran the WebAppBuilder.xml script in the launcher, and I saw the
>
> directory
>
>>>>structure. However, I am still unsure of how to deploy the
>>>>application. I
>>>>would sincerely appreciate any help.
>>>>
>>>>
>>>> Regards,
>>>> Khawaja
>>>>
>>>>
>>
>>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>
>><?xml version="1.0" encoding="UTF-8"?>
>><feature
>> id="org.eclipse.equinox.servlet.bridge.feature"
>> label="org.eclipse.equinox.servlet.bridge.feature"
>> version="1.0.0">
>>
>> <description>
>> Servlet Bridge Feature
>> </description>
>>
>> <copyright>
>> 2006 Eclipse Foundation and others.
>> </copyright>
>>
>> <license url="http://www.eclipse.org/legal/epl-v10.html">
>> ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT
>> </license>
>>
>> <requires>
>> <import plugin="org.eclipse.equinox.common" version="3.2.0"
>
> match="compatible"/>
>
>> <import plugin="org.eclipse.core.jobs"/>
>> <import plugin="org.eclipse.osgi" version="3.2.0"
>
> match="compatible"/>
>
>> <import plugin="org.eclipse.equinox.servlet.bridge.launcher"/>
>> </requires>
>>
>> <plugin
>> id="org.eclipse.osgi"
>> download-size="0"
>> install-size="0"
>> version="3.2.0.v20060601"
>> unpack="false"/>
>>
>> <plugin
>> id="org.eclipse.osgi.services"
>> download-size="0"
>> install-size="0"
>> version="3.1.100.v20060601"
>> unpack="false"/>
>>
>> <plugin
>> id="org.eclipse.equinox.common"
>> download-size="0"
>> install-size="0"
>> version="3.2.0.v20060603"
>> unpack="false"/>
>>
>> <plugin
>> id="org.eclipse.equinox.registry"
>> download-size="0"
>> install-size="0"
>> version="3.2.0.v20060601"
>> unpack="false"/>
>>
>> <plugin
>> id="org.eclipse.update.configurator"
>> download-size="0"
>> install-size="0"
>> version="3.2.0.v20060511"
>> unpack="false"/>
>>
>> <plugin
>> id="org.eclipse.equinox.http.registry"
>> download-size="0"
>> install-size="0"
>> version="3.2.0.200607121155"
>> unpack="false"/>
>>
>> <plugin
>> id="org.eclipse.equinox.servlet.bridge.http"
>> download-size="0"
>> install-size="0"
>> version="3.2.0.200607121155"
>> unpack="false"/>
>>
>> <plugin
>> id="org.eclipse.equinox.servlet.api"
>> download-size="0"
>> install-size="0"
>> version="1.0.0.v20060601"
>> unpack="false"/>
>>
>> <plugin
>> id="sample.http"
>> download-size="0"
>> install-size="0"
>> version="1.0.0"
>> unpack="false"/>
>>
>></feature>
>>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>
>>#Eclipse Runtime Configuration File
>>osgi.bundles=org.eclipse.equinox.common@2:start,
>
> org.eclipse.update.configurator@start,
> org.eclipse.equinox.servlet.bridge.http@start,
> org.eclipse.equinox.http.registry@start
>
>>osgi.bundles.defaultStartLevel=4
>>
>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>
>><?xml version="1.0" encoding="UTF-8"?>
>><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
>
> 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
>
>><web-app id="WebApp">
>><servlet id="bridge">
>><servlet-name>equinoxbridgeservlet</servlet-name>
>><display-name>Equinox Bridge Servlet</display-name>
>><description>Equinox Bridge Servlet</description>
>>
> <servlet-class>org.eclipse.equinox.servlet.bridge.launcher.BridgeServlet </se
> rvlet-class>
>
>><init-param>
>><param-name>commandline</param-name>
>><param-value>-console</param-value>
>></init-param>
>><init-param>
>><param-name>enableFrameworkControls</param-name>
>><param-value>true</param-value>
>></init-param>
>><!--
>> You can specify your own framework launcher here.
>> The default is:
>
> org.eclipse.equinox.servlet.bridge.launcher.FrameworkLaunche r
>
>><init-param>
>><param-name>frameworkLauncherClass</param-name>
>>
> <param-value> org.eclipse.equinox.servlet.bridge.launcher.FrameworkLaunche r </
> param-value>
>
>></init-param>
>>-->
>><load-on-startup>1</load-on-startup>
>></servlet>
>><servlet-mapping>
>><servlet-name>equinoxbridgeservlet</servlet-name>
>><url-pattern>/*</url-pattern>
>></servlet-mapping>
>></web-app>
>>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <feature
> id="org.eclipse.equinox.servlet.bridge.feature"
> label="org.eclipse.equinox.servlet.bridge.feature"
> version="1.0.0">
>
> <description>
> Servlet Bridge Feature
> </description>
>
> <copyright>
> 2006 Eclipse Foundation and others.
> </copyright>
>
> <license url="http://www.eclipse.org/legal/epl-v10.html">
> ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT
> </license>
>
> <plugin
> id="org.eclipse.osgi"
> download-size="0"
> install-size="0"
> version="3.2.0.v20060601"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.osgi.services"
> download-size="0"
> install-size="0"
> version="3.1.100.v20060601"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.common"
> download-size="0"
> install-size="0"
> version="3.2.0.v20060603"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.registry"
> download-size="0"
> install-size="0"
> version="3.2.0.v20060601"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.update.configurator"
> download-size="0"
> install-size="0"
> version="3.2.0.v20060605"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.http.registry"
> download-size="0"
> install-size="0"
> version="3.2.0.200607122227"
> unpack="false"/>
>
> <plugin
> id="org.eclipse.equinox.servlet.bridge.http"
> download-size="0"
> install-size="0"
> version="3.2.0.200607122227"
> unpack="false"/>
>
> <plugin
> id="sample.http"
> download-size="0"
> install-size="0"
> version="1.0.0"
> unpack="false"/>
>
> </feature>
|
|
|
Re: Deploying servlet on a tomcat [message #71051 is a reply to message #70956] |
Wed, 26 July 2006 15:48  |
Eclipse User |
|
|
|
Originally posted by: skaegi.sympatico.ca
Try http://localhost:8080/bridge/servlet/console ;)
For the problems with basic I/O on linux using Tomcat... removing the line
in catalina.sh that pipes to "catalina.out" should do it
(... or Jetty on Linux doesn't do this)
-Simon
"Khawaja Shams" <ksshams@gmail.com> wrote in message
news:ea8dg9$9vd$1@utils.eclipse.org...
> Hello again,
> Thank you for all your help so far. Our servlet is up and running
> on tomcat without any problems (on a windows machine). I have a few
> more questions.
>
> 1) When I start tomcat on windows, a new window pops up with the logs
> and has an osgi prompt. However, this is not the case for a linux (when
> I start tomcat using startup.sh). All the logs are being directed to
> catalina.out, and I can see the osgi prompt inside the file.
>
> 2) Are there any instructions on using the http-console bundle? I tried
> using it by putting in my platform/plugins folder and added an @start
> for this bundle in my config.ini file. However, I cannot see anything
> when I go to http://localhost:8080/bridge/console. Is there anything
> that I am missing?
>
> Thanks in advance.
>
> Regards,
> Khawaja Shams
>
>
> Simon Kaegi wrote:
> > Hi Khawaja,
> >
> > It looks like everything is there but my guess is that the problem is
that
> > the sample.http bundle is not started.
> > You can add sample.http@start in your config.ini to have the bundle
> > automatically started or else use the console to manually start it.
> >
> > I've included a config.ini and feature.xml that I put together for this
> > purpose. (less fancy than your feature.xml but notice that the
servlet.api
> > bundle is not packaged in the war file as the servlet container will
supply
> > it)
> >
> > Here is the result of an "ss" from the console.
> > osgi> ss
> >
> > Framework is launched.
> >
> > id State Bundle
> > 0 ACTIVE system.bundle_3.2.0.v20060601
> > Fragments=8
> > 1 ACTIVE org.eclipse.equinox.common_3.2.0.v20060603
> > 2 ACTIVE org.eclipse.update.configurator_3.2.0.v20060605
> > 3 ACTIVE
> > org.eclipse.equinox.servlet.bridge.http_3.2.0.200607122227
> > 4 ACTIVE org.eclipse.equinox.http.registry_3.2.0.200607122227
> > 7 ACTIVE org.eclipse.equinox.registry_3.2.0.v20060601
> > 8 RESOLVED
org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
> > Master=0
> > 10 RESOLVED org.eclipse.osgi.services_3.1.100.v20060601
> > 13 ACTIVE sample.http_1.0.0
> >
> > Speaking of which...
> >
> >>1) Where is the console launched? When I start tomcat, I see the osgi
> >>prompt as part of the logs, but I am not sure how to execute commands on
> >>it.
> >
> > By default the console is launched using stdin/stdout. If you launch
tomcat
> > from the command e.g. "bin/startup.bat" you can use the console
directly.
> > Keep in mind that the console is more a dev tool useful to get a feel
for
> > things. Type "help" for console commands. "ss" is particularly useful ;)
> >
> > Once you've got the basics nailed down you might want to take a look at
the
> > http-console packaged at
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=122911
> >
> >
> >>2) I am not sure I see an sp_clean option in the bridge servlet. I
> >>tried it, and it did not work. Does sp_redeploy result in similar
> >>functionality?
> >
> > Yes, you're right sp_clean was an old command that eventually became
> > sp_undeploy. sp_redeploy will give you the desired result.
> >
> > GL
> > -Simon
> >
> > "Khawaja Shams" <ksshams@gmail.com> wrote in message
> > news:e93hu9$fnj$1@utils.eclipse.org...
> >
> >>Hello,
> >> My attachment was too big, so it did not go through. Here are the
> >>vital files. Also, here is a listing of what is in the plugin
directory:
> >>org.eclipse.equinox.common_3.2.0.v20060603.jar
> >>org.eclipse.equinox.http.registry_3.2.0.200607121155.jar
> >>org.eclipse.equinox.registry_3.2.0.v20060601.jar
> >>org.eclipse.equinox.servlet.api_1.0.0.v20060601.jar
> >>org.eclipse.equinox.servlet.bridge.extensionbundle_3.2.0
> >> org.eclipse.equinox.servlet.bridge.http_3.2.0.200607121155.j ar
> >>org.eclipse.osgi.services_3.1.100.v20060601.jar
> >>org.eclipse.osgi_3.2.0.v20060601.jar
> >>org.eclipse.update.configurator_3.2.0.v20060511.jar
> >>sample.http_1.0.0.jar
> >>
> >>
> >>Thanks again.
> >>
> >>Khawaja
> >>
> >>Khawaja Shams wrote:
> >>
> >>>Hello,
> >>>
> >>>
> >>> Thank you Simon for your help so far.
> >>>
> >>>1) Where is the console launched? When I start tomcat, I see the osgi
> >>>prompt as part of the logs, but I am not sure how to execute commands
on
> >>>it.
> >>>
> >>>
> >>>
> >>>2) I am not sure I see an sp_clean option in the bridge servlet. I
> >>>tried it, and it did not work. Does sp_redeploy result in similar
> >>>functionality?
> >>>
> >>>
> >>>Currently, when I deploy the servlet, I cannot access the helloworld
> >>>application. I am hitting the url:
> >>>http://localhost:8080/bridge/helloworld
> >>>
> >>>I am attaching my bridge folder as a zipped archived. Can anyone give
> >>>me some pointers on where I am going wrong? I am placing the
> >>>unarchived folder in the webapps folder of tomcat5.5.17. Thank you for
> >>>your time and help.
> >>>
> >>>Regards,
> >>>Khawaja
> >>>
> >>>Simon Kaegi wrote:
> >>>
> >>>
> >>>>Hi Khawaja,
> >>>>
> >>>>It sounds like you have everything deployed correctly. If you deployed
> >>>>the
> >>>>webapp overtop of an existing install it's a good idea to "sp_clean"
> >
> > your
> >
> >>>>environment.
> >>>>
> >>>>In terms of next steps... by default the "console" is launched which
> >>>>you can
> >>>>use to verify that everything is installed and started correctly. I'd
> >>>>spend
> >>>>some time learning the console commands as they're invaluable when
> >>>>tracking
> >>>>down problems.
> >>>>
> >>>>All requests are proxied through the BridgeServlet. You can access the
> >>>>servlet and resource registered by the "sample.http" bundle at
> >>>>"/helloworld"
> >>>>and "/helloworld.html" relative to the context where you installed the
> >>>>war.
> >>>>e.g. http://localhost:8080/bridge/helloworld
> >>>>
> >>>> If you're using "sample.http.registry" try "/ext/helloworld" and
> >>>>"/ext/helloworld.html" again prefixed by your ServletContext path.
> >>>>
> >>>>Hope this helps.
> >>>>-Simon
> >>>>
> >>>>
> >>>>
> >>>>
> >>
>
>>> ------------------------------------------------------------ -------------
> >
> > ---
> >
> >>>>--
> >>>> From: equinox-dev-bounces@eclipse.org
> >>>>[mailto:equinox-dev-bounces@eclipse.org] On Behalf Of Khawaja Shams
> >>>> Sent: Tuesday, July 11, 2006 8:33 PM
> >>>> To: Equinox development mailing list
> >>>> Subject: [equinox-dev] Deploying servlet on a tomcat
> >>>>
> >>>>
> >>>> Hello,
> >>>> I was able to deploy my servlet on the osgi framework within
> >>>>Eclipse,
> >>>>and all the needed services worked fine. My next step is to deploy
> >
> > this
> >
> >>>>project on our production tomcat instance. I am looking at the
> >
> > following
> >
> >>>>guide:
> >>>>
> >>>>
> >
> >
http://www.eclipse.org/equinox/incubator/server/embedding_in _a_servlet_container.php
> >
> >>>>
> >>>> I have deployed bridge.war, and the sp_test context shows that the
> >>>>bridge
> >>>>is deployed successfully. I have also downloaded the sample
> >>>>applications.
> >>>>I followed the instructions on the build process section, and I have
> >
> > the
> >
> >>>>following directory structure:
> >>>>
> >>>> RangeMapServle/t
> >>>> WEB-INF/
> >>>> web.xml (same as sample web application)
> >>>> lib/
> >>>> servlet-bridge.jar
> >>>> platform/
> >>>> plugins/
> >>>> all my dependent plugins along with
> >>>>everything in
> >>>>this folder of the sample web application (without registry)
> >>>> features/
> >>>> feature.xml (same as the sample application +
> >
> > my
> >
> >>>>bundle added to the description)
> >>>> configuration/
> >>>> config.ini (same as sample + an @start for my
> >>>>bundle
> >>>> launch.ini
> >>>>
> >>>>
> >>>>
> >>>> I am curious what the next step should be. I tried creating a war
> >>>>archive
> >>>>and placing it in tomcat's webapp directory. Tomcat's log shows an
> >>>>attempt
> >>>>to deploy the application as well. However, I am not sure if properly
> >>>>deployed or not. Moreover, how would I access the servlet? Would it
be
> >>>>accessed through the bridge servlet? If there are any instructions on
> >>>>how to
> >>>>access the sample application once deployed, I would like to see them.
> >
> > I
> >
> >>>>ran the WebAppBuilder.xml script in the launcher, and I saw the
> >
> > directory
> >
> >>>>structure. However, I am still unsure of how to deploy the
> >>>>application. I
> >>>>would sincerely appreciate any help.
> >>>>
> >>>>
> >>>> Regards,
> >>>> Khawaja
> >>>>
> >>>>
> >>
> >>
> >
> >
>
> ------------------------------------------------------------ --------------
--
> > ----
> >
> >
> >
> >><?xml version="1.0" encoding="UTF-8"?>
> >><feature
> >> id="org.eclipse.equinox.servlet.bridge.feature"
> >> label="org.eclipse.equinox.servlet.bridge.feature"
> >> version="1.0.0">
> >>
> >> <description>
> >> Servlet Bridge Feature
> >> </description>
> >>
> >> <copyright>
> >> 2006 Eclipse Foundation and others.
> >> </copyright>
> >>
> >> <license url="http://www.eclipse.org/legal/epl-v10.html">
> >> ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT
> >> </license>
> >>
> >> <requires>
> >> <import plugin="org.eclipse.equinox.common" version="3.2.0"
> >
> > match="compatible"/>
> >
> >> <import plugin="org.eclipse.core.jobs"/>
> >> <import plugin="org.eclipse.osgi" version="3.2.0"
> >
> > match="compatible"/>
> >
> >> <import plugin="org.eclipse.equinox.servlet.bridge.launcher"/>
> >> </requires>
> >>
> >> <plugin
> >> id="org.eclipse.osgi"
> >> download-size="0"
> >> install-size="0"
> >> version="3.2.0.v20060601"
> >> unpack="false"/>
> >>
> >> <plugin
> >> id="org.eclipse.osgi.services"
> >> download-size="0"
> >> install-size="0"
> >> version="3.1.100.v20060601"
> >> unpack="false"/>
> >>
> >> <plugin
> >> id="org.eclipse.equinox.common"
> >> download-size="0"
> >> install-size="0"
> >> version="3.2.0.v20060603"
> >> unpack="false"/>
> >>
> >> <plugin
> >> id="org.eclipse.equinox.registry"
> >> download-size="0"
> >> install-size="0"
> >> version="3.2.0.v20060601"
> >> unpack="false"/>
> >>
> >> <plugin
> >> id="org.eclipse.update.configurator"
> >> download-size="0"
> >> install-size="0"
> >> version="3.2.0.v20060511"
> >> unpack="false"/>
> >>
> >> <plugin
> >> id="org.eclipse.equinox.http.registry"
> >> download-size="0"
> >> install-size="0"
> >> version="3.2.0.200607121155"
> >> unpack="false"/>
> >>
> >> <plugin
> >> id="org.eclipse.equinox.servlet.bridge.http"
> >> download-size="0"
> >> install-size="0"
> >> version="3.2.0.200607121155"
> >> unpack="false"/>
> >>
> >> <plugin
> >> id="org.eclipse.equinox.servlet.api"
> >> download-size="0"
> >> install-size="0"
> >> version="1.0.0.v20060601"
> >> unpack="false"/>
> >>
> >> <plugin
> >> id="sample.http"
> >> download-size="0"
> >> install-size="0"
> >> version="1.0.0"
> >> unpack="false"/>
> >>
> >></feature>
> >>
> >
> >
>
> ------------------------------------------------------------ --------------
--
> > ----
> >
> >
> >
> >>#Eclipse Runtime Configuration File
> >>osgi.bundles=org.eclipse.equinox.common@2:start,
> >
> > org.eclipse.update.configurator@start,
> > org.eclipse.equinox.servlet.bridge.http@start,
> > org.eclipse.equinox.http.registry@start
> >
> >>osgi.bundles.defaultStartLevel=4
> >>
> >
> >
> >
>
> ------------------------------------------------------------ --------------
--
> > ----
> >
> >
> >
> >><?xml version="1.0" encoding="UTF-8"?>
> >><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
> >
> > 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> >
> >><web-app id="WebApp">
> >><servlet id="bridge">
> >><servlet-name>equinoxbridgeservlet</servlet-name>
> >><display-name>Equinox Bridge Servlet</display-name>
> >><description>Equinox Bridge Servlet</description>
> >>
> >
<servlet-class>org.eclipse.equinox.servlet.bridge.launcher.BridgeServlet </se
> > rvlet-class>
> >
> >><init-param>
> >><param-name>commandline</param-name>
> >><param-value>-console</param-value>
> >></init-param>
> >><init-param>
> >><param-name>enableFrameworkControls</param-name>
> >><param-value>true</param-value>
> >></init-param>
> >><!--
> >> You can specify your own framework launcher here.
> >> The default is:
> >
> > org.eclipse.equinox.servlet.bridge.launcher.FrameworkLaunche r
> >
> >><init-param>
> >><param-name>frameworkLauncherClass</param-name>
> >>
> >
<param-value> org.eclipse.equinox.servlet.bridge.launcher.FrameworkLaunche r </
> > param-value>
> >
> >></init-param>
> >>-->
> >><load-on-startup>1</load-on-startup>
> >></servlet>
> >><servlet-mapping>
> >><servlet-name>equinoxbridgeservlet</servlet-name>
> >><url-pattern>/*</url-pattern>
> >></servlet-mapping>
> >></web-app>
> >>
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <feature
> > id="org.eclipse.equinox.servlet.bridge.feature"
> > label="org.eclipse.equinox.servlet.bridge.feature"
> > version="1.0.0">
> >
> > <description>
> > Servlet Bridge Feature
> > </description>
> >
> > <copyright>
> > 2006 Eclipse Foundation and others.
> > </copyright>
> >
> > <license url="http://www.eclipse.org/legal/epl-v10.html">
> > ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT
> > </license>
> >
> > <plugin
> > id="org.eclipse.osgi"
> > download-size="0"
> > install-size="0"
> > version="3.2.0.v20060601"
> > unpack="false"/>
> >
> > <plugin
> > id="org.eclipse.osgi.services"
> > download-size="0"
> > install-size="0"
> > version="3.1.100.v20060601"
> > unpack="false"/>
> >
> > <plugin
> > id="org.eclipse.equinox.common"
> > download-size="0"
> > install-size="0"
> > version="3.2.0.v20060603"
> > unpack="false"/>
> >
> > <plugin
> > id="org.eclipse.equinox.registry"
> > download-size="0"
> > install-size="0"
> > version="3.2.0.v20060601"
> > unpack="false"/>
> >
> > <plugin
> > id="org.eclipse.update.configurator"
> > download-size="0"
> > install-size="0"
> > version="3.2.0.v20060605"
> > unpack="false"/>
> >
> > <plugin
> > id="org.eclipse.equinox.http.registry"
> > download-size="0"
> > install-size="0"
> > version="3.2.0.200607122227"
> > unpack="false"/>
> >
> > <plugin
> > id="org.eclipse.equinox.servlet.bridge.http"
> > download-size="0"
> > install-size="0"
> > version="3.2.0.200607122227"
> > unpack="false"/>
> >
> > <plugin
> > id="sample.http"
> > download-size="0"
> > install-size="0"
> > version="1.0.0"
> > unpack="false"/>
> >
> > </feature>
|
|
|
Goto Forum:
Current Time: Thu Jul 24 00:33:17 EDT 2025
Powered by FUDForum. Page generated in 0.05293 seconds
|