WAR format question

2003-02-03 Thread Jim Carlson
Hello, I have a question about the WAR directory structure. Namely, where is the appropriate place to put configuration files, log files, and other files that need to be read/written-to by my application? Clearly putting them in the webroot isn't right. Can my application access arbitrary

Re: WAR format question

2003-02-03 Thread Jacob Kjome
Put stuff that isn't supposed to be accessed via the web under WEB-INF. You can create whatever directory structures you want within that. In order to obtain access to a file under WEB-INF in a completely portable way, use something like... getServletContext().getResourceAsStream("/WEB-INF/my

Re: WAR format question

2003-02-04 Thread Bill Barker
Read-only files can be placed anywhere you want. For files that you need to write to, use the 'javax.servlet.context.tmpdir' attribute of the ServletContext (since you can't write to a WAR file :). Assuming that your servlet extends GenericServlet (this includes the cases of HttpServlet, and Tomc

Re: WAR format question

2003-02-04 Thread Erik Price
Jacob Kjome wrote: In order to obtain access to a file under WEB-INF in a completely portable way, use something like... getServletContext().getResourceAsStream("/WEB-INF/myproperties.xml"); What about if we have a tag descriptor somewhere below WEB-INF, is it safe to refer to the path dir

Re: WAR format question

2003-02-04 Thread Erik Price
Jake, Well, thanks anyway. Maybe somebody else knows the score on this one and will pipe up. :) Erik Jacob Kjome wrote: Hello Erik, Sorry, I don't do JSP and haven't a clue about taglibs Jake Tuesday, February 04, 2003, 9:31:27 AM, you wrote: EP> Jacob Kjome wrote: In order to obta

RE: WAR format question

2003-02-04 Thread Tim Moore
-- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 > -Original Message- > From: Erik Price [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 04, 2003 12:27 PM > To: Tomcat

Re: WAR format question

2003-02-04 Thread Erik Price
Tim Moore wrote: Hi Erik, EP> What about if we have a tag descriptor somewhere below WEB-INF, is EP> it EP> safe to refer to the path directly from the "uri" attribute of the <%@ taglib %>> directive? Yeah, you can do that. :-) Thanks. Actually, I've already done it and it work

RE: WAR format question

2003-02-04 Thread Tim Moore
> -Original Message- > From: Erik Price [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 04, 2003 2:14 PM > To: Tomcat Users List > Subject: Re: WAR format question > > > > > Tim Moore wrote: > > Hi Erik, > > > > > >>&g

Re: WAR format question

2003-02-04 Thread Jim Carlson
Thanks. This answers my question, but I'm still left with the impression that I'll need to go beyond the WAR format if I want to write to a log or flat file DB (i.e., non-temp application file). Also, since containers don't guarantee support for an unpacked WAR (are there any containers tha

RE: WAR format question

2003-02-04 Thread Tim Moore
> -Original Message- > From: Jim Carlson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 04, 2003 3:07 PM > To: Tomcat Users List > Subject: Re: WAR format question > > >Thanks. This answers my question, but I'm still left with the > impression

Re: WAR format question

2003-02-04 Thread Will Hartung
> From: "Jim Carlson" <[EMAIL PROTECTED]> > Sent: Tuesday, February 04, 2003 12:06 PM > Subject: Re: WAR format question >Thanks. This answers my question, but I'm still left with the > impression that I'll need to go beyond the WAR format if I want

Re[2]: WAR format question

2003-02-04 Thread Jacob Kjome
Hello Erik, Sorry, I don't do JSP and haven't a clue about taglibs Jake Tuesday, February 04, 2003, 9:31:27 AM, you wrote: EP> Jacob Kjome wrote: >> >> In order to obtain access to a file under WEB-INF in a completely >> portable way, use something like... >> >> getServletContext().getReso

Re[2]: WAR format question

2003-02-04 Thread Jacob Kjome
Hello Jim, Use a framework like Log4j which has lots of different appenders in addition to the FileAppender and RollingFileAppender. If you really want to log to file, then provide a for the location of the files. Then you can override that with server-specific config such as with the element