Thank you very much. I really appreciate your quick reply.
Jerry
djencks wrote:
On Jun 22, 2007, at 1:49 PM, Jerry Luo wrote:
I am trying to deploy a application on geronimo 1.1.1. And the
application
needs to visit some resource files, and the resource files are in a
path.
But I didn't find any place to set the path into the class path. In
JBOSS,
WEBLOGIC, I can add the path to class path by modifying its start
up script.
But I don't know how to add it into Geronimo start up script. I
tried to add
'CLASSPATH' to geronimo.bat, but it didn't work.
There are two recommended ways to do this in geronimo:
1. If your resources can be relocated and are in a jar file, install
the jar file at an appropriate location in the geronimo repository
and include a dependency on the jar file in your geronimo deployment
plan. For instance your plan might start something like this:
web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-1.1;
environment xmlns=http://geronimo.apache.org/xml/ns/
deployment-1.1
moduleId
groupIdorg.mycompany/groupId
artifactIdmyproject/artifactId
version$1.0/version
typecar/type
/moduleId
dependencies
dependency
groupIdorg.mycompany/groupId
artifactIdmyresourcesjar/artifactId
typejar/type
/dependency
/dependencies
/environment
.
2. If you can't move the resources into the geronimo repo or they
aren't in a jar file, add a SharedLib gbean to your geronimo
deployment plan, and point it to where you want to put the files.
For instance the configuration might look like:
gbean name=SharedLib
class=org.apache.geronimo.system.sharedlib.SharedLib
attribute name=classesDirs/absolute/path/to/the/
resources/attribute
reference name=ServerInfo
nameServerInfo/name
/reference
/gbean
Both of these methods get the resources into the classloader of your
app without forcing them into every application running in geronimo.
hope this helps
david jencks
--
View this message in context: http://www.nabble.com/Don%27t-find-a-
place-to-set-the-class-path-tf3966076s134.html#a11257037
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.
--
View this message in context:
http://www.nabble.com/Don%27t-find-a-place-to-set-the-class-path-tf3966076s134.html#a11290367
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.