Hi -
I think it would be better to use java.io.File.separator (which will be
identical to file.separator, but is clearer and compile-time checked for
typos (as opposed to the string file.separator )).
Tim
egan0019 wrote:
When building file path strings, should one always use the
I'm scheming on a little project, and one of the things I want to be able to
do is simply add content to the application.
The typical way to add content is also rather static -- add it to the WAR
and redeploy.
That's not particularly dynamic tho, and doesn't really facilitate changing
content
for changes. Don't take this as gospel
though, this is a hazy half-remembered bit of info.
-Original Message-
From: Will Hartung [mailto:[EMAIL PROTECTED]
Sent: Friday 27 May 2005 18:31
To: Tomcat Users List
Subject: Adding content/JSPs on the fly
I'm scheming on a little project
When building file path strings, should one always use the
System.getProperty(file.separator) return value? Is this to
differentiate between Windows(\) and unix/linux/solaris(/ separators?
I haven't seen that property before.
And, are there any other things I should know about to make my file
From: Steve Kirk [EMAIL PROTECTED]
Sent: Friday, May 27, 2005 11:44 AM
It sounds reasonable, but probably isn't tested or by design, so
probably
best to just have a go. Re portability, the best advice I can offer is an
old chestnut: read the servlet spec. This is particularly relevant in
Could you instead store the JSP in a database?
Let's say you have a table with the following structure:
jsp_nameString
jsp_content BLOB
jsp_name is your primary key and is literally a JSP name.
Now, create a servlet filter that examines the path that was requested
and pulls out
From: Frank W. Zammetti [EMAIL PROTECTED]
Sent: Friday, May 27, 2005 1:04 PM
Could you instead store the JSP in a database?
... snip ...
Now, get the BLOB from the database based on that JSP name. Convert the
BLOB to a string and stick it in request, then forward to a JSP that is
the
for.
And that's an easy choice to make :)
-Original Message-
From: Will Hartung [mailto:[EMAIL PROTECTED]
Sent: Friday 27 May 2005 20:38
To: Tomcat Users List
Subject: Re: Adding content/JSPs on the fly
From: Steve Kirk [EMAIL PROTECTED]
Sent: Friday, May 27, 2005 11:44 AM