tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Lucia" <timlu...@yahoo.com>
Subject RE: System.setProperty/System.getProperty
Date Thu, 06 Apr 2006 00:53:26 GMT
Lucky for you, it's all Java!

My suggestion would be to create a path underneath WEB-INF/classes, and then
use the classloader to locate the file, and return an InputStream for it.

As part of the compile / prepare rule, you would copy the template source
files into the WEB-INF/classes/templates/ hierarchy.

Voila!  No more paths, except for relative, Java ones.

Tim

-----Original Message-----
From: Farrow, Marc [mailto:MFarrow@sefl.com] 
Sent: Wednesday, April 05, 2006 8:05 PM
To: Tomcat Users List
Subject: RE: System.setProperty/System.getProperty

Thanks.  This is what I needed to get started.  I need to implement this
through Tomcat as well.  I will research tomorrow.  Thanks for the lead.


-----Original Message-----
From: Tim Lucia [mailto:timlucia@yahoo.com]
Sent: Wednesday, April 05, 2006 8:03 PM
To: 'Tomcat Users List'
Subject: RE: System.setProperty/System.getProperty

P.S. For reference, here is an excellent how-to:

http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html


-----Original Message-----
From: Tim Lucia [mailto:timlucia@yahoo.com]
Sent: Wednesday, April 05, 2006 7:42 PM
To: 'Tomcat Users List'
Subject: RE: System.setProperty/System.getProperty

Why not use the property mechanism to find the template files?  Any time you
rely on a servlet/app using an absolute file path, you are asking for
trouble.

Tim

-----Original Message-----
From: Farrow, Marc [mailto:MFarrow@sefl.com]
Sent: Wednesday, April 05, 2006 7:24 PM
To: Tomcat Users List
Subject: RE: System.setProperty/System.getProperty

The differences are between testing environment and
production/semi-production environment between windows and other platforms.
We store templates, etc in a certain folder and have to read them.  However
the "path" is different between Oses (not just specific to OpenVMS).  I want
to use some technique to handle the "path" differences.  Just figured if I
could add them to some Property/Locale Resource it would be easiest.

-----Original Message-----
From: Tim Lucia [mailto:timlucia@yahoo.com]
Sent: Wednesday, April 05, 2006 7:18 PM
To: 'Tomcat Users List'
Subject: RE: System.setProperty/System.getProperty

Wow.  OpenVMS is still in existence?  And it has a JVM?  Double Wow!

How come the I/O is different?  Shouldn't Java handle that for you?

Tim
(Former DECcie, 1988-1997)

-----Original Message-----
From: Farrow, Marc [mailto:MFarrow@sefl.com]
Sent: Wednesday, April 05, 2006 7:03 PM
To: Tomcat-User@Jakarta. Apache. Org (E-mail)
Subject: System.setProperty/System.getProperty

Is there an easy way within Tomcat to set System properties so that all
webapps have access to them at startup?  Basically, I would like to add my
own properties to the System object at startup as opposed to using
environment entries.  Maybe I am over thinking things.  Or better yet, what
is the best way to use Resource Locales per O.S.?  We test/deploy on win2k
but have live server of OpenVMS.  The main reason I need this is because
File
I/O is a lot different between the platforms.

Thanks,

Marc


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message