On another server, in a standalone Tomcat server, I locate a properties file using a JNDI lookup by adding the following entry in my server.xml file.
<!-- Global JNDI resources -->
<GlobalNamingResources>
<GlobalNamingResources>
<Environment name="Server.properties"
type="java.lang.String"
value="/usr/local/tomcat/conf/Server.properties" />
</GlobalNamingResources>
I am migrating to Geronimo (WAS-CE,
actually) and cannot figure out quite what to put in
WEB-INF/web.xml,
geronimo-web.xml.
I can guess most of what I have to do, except for how to express the location of the file (which is set in the "value" attribute on the "Environment" element shown above).
What is the analog of that in Geronimo? Do I need to add a META-INF/context.xml file?
Here are snippets of my web.xml and geronimo-web.xml files:
web.xml<resource-ref>
<description>Server Properties</description>
<res-ref-name>server/Server.properties</res-ref-name>
<res-type>java.lang.String</res-type>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>geronimo-web.xml<naming:resource-ref>
<naming:ref-name>server/Server.properties</naming:ref-name>
<naming:resource-link>
/srv/www/cops/htdocs/Server.properties
</naming:resource-link>
</naming:resource-ref>
I'm guessing that <naming:resource-link> is where I put the path of the file.
--Bob White-- home:727-490-7363, cell:727-463-6061
photos: http://polina.70kg.com/ http://nastya.70kg.com/
blog: http://milkchaser.blogspot.com/
Everything that irritates us about others can lead us to an understanding of ourselves. - Carl Jung
If there must be trouble, let it be in my day, so that
my children may have peace. - Thomas Paine
There are 10 kinds of people in this world.....those who understand
binary and those who don't.
