users@glassfish.java.net

Webapp resource loading with ../ paths

From: Comerford, Sean <Sean.Comerford_at_espn3.com>
Date: Tue, 23 Jun 2009 12:44:34 +0000

I know this is technically not kosher according to the servlet spec, but
there is a bug in a proprietary servlet framework we use that prevents it
from properly loading context sensitive resources (i.e. It fails when try to
reference something like /WEB-INF/my_config.xml as an init parameter).

We work around this Tomcat by using ../ relative paths. In other words,
Tomcat has CATALINA_BASE and I can work around this bug we have by providing
paths from CATALINA_BASE such as ../webapps/myapp/WEB-INF/my_config.xml.

So does Glassfish have a concept of a ³container home² that I can use to
reference resources relatively via a ../blah/myApp/WEB-INF?

Trying to figure out if that is even possible in Glassfish andd what would
the ../ path look like.

-- 
Sean Comerford, Software Engineer
ESPN.com Site Architecture Group
Office: 860.766.6454    Cell: 860.951.6973