> > > We could switch to getResource() / openStream() to cope with this situation.
> > > Can get a bit tricky when it comes to WM Templates though... But it's
> > > doable.
> >
> > +1
> 
> OK, I'll take a look at it when I have time - it's not very critical right now.
> But it makes me think about another issue. We could use this approach to read
> TurbineResources.properties from the compressed war. BUT! Does this really make
> sense? When you deploy your web application you must set some properties, for
> exaple the database/directory server location, logging properties (log file
> location or log server URL, logging level), possibly a location of a writable
> directory (for uploaded files etc). How is it supposed to be handled in J2EE
> application servers (WebLogic)?

OK, I took some time and read Servlets 2.2 spec. You can define some 'application
environment' items that your application is expecting to find in the appserver's
naming service. You can provide the entry name name, expected type (String,int etc.)
and optional default value.
This is the proper way of dealing with deployment time settings. Nice, but we would
have to depend on naming service being available. How does this sound like? Are
there free (APL) implementations of naming servers that we could start alongside
with Tomcat to emulate industry-grade application server? Or maybe I'm going in
the worong direction? Tell me what you think.

> > > I know that recent Tomcat has support for enforcing security permissions
> > > on servlets. We could distribute a file to include into /conf/tomcat.policy
> > > to grant Turbine the apropriate rights (write to the log file, etc).
> >
> > I'm talking about where do you put turbine.log?
> 
> Yeah, with our current logging implementation we need to write this file
> somewhere. But we might need other writable locations like a repository
> for bundled InstantDB...

Oh, there is a directory where a webapp is waranteed to have write rights. It
can be determined with:
File tempDir = (File)servletContext.getAttribute("javax.servlets.context.tempdir");
(works under Tomcat)
I think it may prove useful.

Rafal


------------------------------------------------------------
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