At 12:07 06/02/2001 +0000, you wrote:
>How can I access getRealPath() from outside of the services?  Is there a way
>to get the ServletConfig or the realpath from the ResourceService?

You may perhaps use 2 of the services we have in Jetspeed, depending on your
need:

* org.apache.jetspeed.services.enginecontext:
This service is wrapper around ServletContext which may be used by classes 
that don't
want to tie to to the Servlet API but stll do some URI -> Path resolutions.
You can use alternate service implementation to provide offline mapping 
resolutions
capabilities.

* org.apache.jetspeed.services.resources.VariableResourceService
This is an alternate implementation of the default ResourceService which 
allows you
to do run-time variable transposition in of your TR.p values.
A few variables are defined by default, especially webapp.dir which is the 
webapp root.
This service impl makes the following TR.p definitions possible:

database.default.driver=org.hsql.jdbcDriver
database.default.url=jdbc:HypersonicSQL:${webapp.dir}/WEB-INF/db/jetspeed
database.default.username=sa
database.default.password=

You may also use the variable substitution with default values, like:
String  path = TurbineResources.getString("myvar.path","${webapp.dir}");

Does that answer your need ?


--
Raphaël Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Services Manager / Paris



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to