On Apr 19, 2008, at 3:05 PM, newbie-gero wrote:
Hi,
i'm using geronimo 2.1. I did try deploying the directory(without
compressing into .war format), but it gives errors. However i can
deploy in
Tomcat. Since tomcat and geronimo are from apache family, i will
like to
know if whether i can deploy the same way in geronimo as tomcat?
To make my explanation clearer, u can try deploy my codes at the first
message by unzip the file and deploy in tomcat
First, you have a problem in your geronimo-web.xml. Changing to
something like this fixes that problem:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
<dep:environment>
<dep:moduleId>
<dep:groupId>sample2.applications</dep:groupId>
<dep:artifactId>VOApp</dep:artifactId>
<dep:version>2.1</dep:version>
</dep:moduleId>
</dep:environment>
<context-root>ims</context-root>
<service-ref>
<service-ref-name>services/ims</service-ref-name>
<port>
<port-name>imsPort</port-name>
<protocol>http</protocol>
<host>localhost</host>
<port>8080</port>
<uri>/ims/ims</uri>
</port>
</service-ref>
</web-app>
Note that the service-ref-name above doesn't match anything in your
web.xml (which has no service-ref definitions at all). You'll need to
fix this to have anything that will work. Deploying with the above
geronimo-web.xml will yield two warnings like the following:
15:52:03,509 WARN [SwitchingServiceRefBuilder] Failed to build
reference to service reference [services/ims] defined in plan file,
reason - corresponding entry in deployment descriptor missing.
However, the deploy should work.
You can deploy in the following manner:
cp -r ims.war <geronimo-home>/deploy/
I'm not the biggest fan of hot-deploy. I'd suggest you use the
following technique:
cd ims.war
jar cvf ../new-ims.war *
cd ..
<geronimo-home>/bin/gsh deploy/deploy ims.war
(or <geronimo-home>/bin/deploy.sh deploy ims.war )
(or use the admin console)
--kevan