----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Another approach would be to user properties. The filename of the
properties would be specified when starting jserv with the option
-D, for example
'java -Dmy_properties=/home/deller/java/props.properties org.apache.jserv.JServ'
You could then load the properties as usual, first opening a
FileInputStream to the properties file like this:
FileInputStream fis = new FileInputStream(System.getProperty("my_properties"));
Properties p = new Properties();
p.load(fis);
g.getProperty("some_property");
> alex Belyansky wrote:
> >
> > ----------------------------------------------------------------
> > BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> > WHEN YOU POST, include all relevant version numbers, log files,
> > and configuration files. Don't make us guess your problem!!!
> > ----------------------------------------------------------------
> >
> > Hi,
> > Does anyone know a way to set an environment variable in Jserv using
> > wrapper.env=[name]=[value] and then read it from a servlet ?
> > I tried the SuperSnoop servlet from the FAQ but it does not pick up the
> > variable I set ( I thought the getAttribute(name) call would do the trick
> > but id did not).
> >
> > I am using Apache, Jserv 1.13b
> > thanks in advance
> >
> > -Alex
> > p.s. I know there are servlet init parameters that can be set in
> > zone.properties, but I can't use those because I am using cocoon and will
> > need to pass a variable to a producer object, which only has access to the
> > request object
> >
> In a future (?) version of JServ you will be able to specify which env
> vars have to be sent to the servlet (dynamically, for every request (ex:
> user SSL certificate field or whatever you want)).
> This is already in CVS, and you can take it also in daily snapshots.
> Not documented yet. read the code and ask if you need.
> (you will have to recompile mod_jserv).
>
> Jean-Luc
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]