RE: [OS-webwork] Configuration in /WEB-INF

2003-06-16 Thread Jason Carreira
The new timer stuff is in J2EE 1.4... Not implemented anywhere in a
production-ready way, as far as I know... Actually, the spec isn't
finalized for J2EE 1.4 yet, is it?

Jason

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 12, 2003 10:28 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] Configuration in /WEB-INF
> 
> 
> Agreed, but use care with the something. While, the servlet 
> spec specifies a return value of null for getRealPath() in a 
> war deployment, it is my understanding that at one time all 
> of the containers did not implement this consistently.  I 
> haven't looked recently, but I would suggest checking the 
> major container vendors to ensure they are compliant with 
> that rule before using an if statement on that null.  
> 
> In the J2EE environment, while you can't have the threads, 
> could you use the new timer stuff to accomplish checking to 
> see if the file has changed??
> 
> LES
> 
> -Original Message-
> From: Anthony Eden [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 11, 2003 9:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] Configuration in /WEB-INF
> 
> Read my original message again: this is a problem which exists for 
> loading resources through both classloaders and the servlet 
> context.  If
> 
> you want something which will always work then you must use interval 
> reloading.  However this means that you have to have a thread 
> which is 
> running to load the resource at a regular basis and this too can be a 
> problem if you are running in a J2EE container.  There is no good 
> solution at this time, i.e. nothing provided by the APIs, but 
> you should
> 
> probably use something (or at least give users the option to 
> use something).
> 
> Sincerely,
> Anthony Eden
> 
> Pat Lightbody wrote:
> 
> >Sounds to me like this is not a good plan then.
> >
> >
> >- Original Message -
> >From: <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Wednesday, June 11, 2003 3:48 PM
> >Subject: RE: [OS-webwork] Configuration in /WEB-INF
> >
> >
> >  
> >
> >>According to the servlet spec getRealPath() will always 
> return null if 
> >>the web application is executing in an non-unpacked war.  So, in
> general
> >>this is not an option for a servlet or any j2ee application.
> >>
> >>LES
> >>
> >>
> >>-Original Message-
> >>From: Pat Lightbody [mailto:[EMAIL PROTECTED]
> >>Sent: Wednesday, June 11, 2003 5:19 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: [OS-webwork] Configuration in /WEB-INF
> >>
> >>Isn't getRealPath() deprecated though?
> >>
> >>-Pat
> >>
> >>- Original Message -
> >>From: "Mathias Bogaert" <[EMAIL PROTECTED]>
> >>To: <[EMAIL PROTECTED]>
> >>Sent: Wednesday, June 11, 2003 2:06 PM
> >>Subject: Re: [OS-webwork] Configuration in /WEB-INF
> >>
> >>
> >>
> >>
> >>>This is exactly the way SiteMesh does it. Have a look at the
> >>>  
> >>>
> >>ConfigLoader.
> >>
> >>
> >>>Cheers,
> >>>Mathias
> >>>
> >>>- Original Message -
> >>>From: "Anthony Eden" <[EMAIL PROTECTED]>
> >>>To: <[EMAIL PROTECTED]>
> >>>Sent: Wednesday, June 11, 2003 10:44 PM
> >>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
> >>>
> >>>
> >>>  
> >>>
> >>>>There is an interesting problem with using the ClassLoader or the 
> >>>>ServletContext for getting resource data: there is no way 
> using the
> >>>>
> >>>>
> >>APIs
> >>
> >>
> >>>>to determine if the resource has been modified.
> >>>>
> >>>>One workaround is to check the getRealPath() method to 
> see if it is 
> >>>>available and use it if it is to build a real file object 
> which you
> >>>>
> >>>>
> >>can
> >>
> >>
> >>>>use to determine the last modified date.  Another 
> possibility is to 
> >>>>specify a reload interval for the resource.
> >>>>
> >>>>Does XWork (and/or WW2) provide either of these methods for
> >>>>
> >>>>
> >>reloading
&g

RE: [OS-webwork] Configuration in /WEB-INF

2003-06-16 Thread Jason Carreira
> -Original Message-
> From: BOGAERT Mathias [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 12, 2003 3:39 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [OS-webwork] Configuration in /WEB-INF
> 
> 
> Exactly my point. So this is a good solution after all. 
> Should we vote on this or something?
> 
> Also, we should change xwork.xml to webwork.xml (but still 
> support xwork.xml in the classpath).
> 
> Mathias
> 

This can be done in the ServletDispatcher, during init()... You can set
the ConfigurationProvider to be an XmlConfigurationProvider with a
different file name (it defaults to "xwork.xml").

This should not be changed in Xwork, though...

Jason


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] Configuration in /WEB-INF

2003-06-16 Thread Jason Carreira


> -Original Message-
> From: Anthony Eden [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 11, 2003 4:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] Configuration in /WEB-INF
> 
> 
> There is an interesting problem with using the ClassLoader or the 
> ServletContext for getting resource data: there is no way 
> using the APIs 
> to determine if the resource has been modified.
> 
> One workaround is to check the getRealPath() method to see if it is 
> available and use it if it is to build a real file object 
> which you can 
> use to determine the last modified date.  Another possibility is to 
> specify a reload interval for the resource.
> 
> Does XWork (and/or WW2) provide either of these methods for reloading 
> configuration resources?
> 
> -Anthony
> 

These file reloading functions have been pushed into OSCore, but yes...
It will check file time stamps for changes. 

Jason


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] Configuration in /WEB-INF

2003-06-12 Thread Les . Stroud
Agreed, but use care with the something. While, the servlet spec
specifies a return value of null for getRealPath() in a war deployment,
it is my understanding that at one time all of the containers did not
implement this consistently.  I haven't looked recently, but I would
suggest checking the major container vendors to ensure they are
compliant with that rule before using an if statement on that null.  

In the J2EE environment, while you can't have the threads, could you use
the new timer stuff to accomplish checking to see if the file has
changed??

LES

-Original Message-
From: Anthony Eden [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2003 9:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

Read my original message again: this is a problem which exists for 
loading resources through both classloaders and the servlet context.  If

you want something which will always work then you must use interval 
reloading.  However this means that you have to have a thread which is 
running to load the resource at a regular basis and this too can be a 
problem if you are running in a J2EE container.  There is no good 
solution at this time, i.e. nothing provided by the APIs, but you should

probably use something (or at least give users the option to use
something).

Sincerely,
Anthony Eden

Pat Lightbody wrote:

>Sounds to me like this is not a good plan then.
>
>
>- Original Message - 
>From: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, June 11, 2003 3:48 PM
>Subject: RE: [OS-webwork] Configuration in /WEB-INF
>
>
>  
>
>>According to the servlet spec getRealPath() will always return null if
>>the web application is executing in an non-unpacked war.  So, in
general
>>this is not an option for a servlet or any j2ee application.
>>
>>LES
>>
>>
>>-Original Message-
>>From: Pat Lightbody [mailto:[EMAIL PROTECTED] 
>>Sent: Wednesday, June 11, 2003 5:19 PM
>>To: [EMAIL PROTECTED]
>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
>>
>>Isn't getRealPath() deprecated though?
>>
>>-Pat
>>
>>- Original Message -
>>From: "Mathias Bogaert" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Wednesday, June 11, 2003 2:06 PM
>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
>>
>>
>>
>>
>>>This is exactly the way SiteMesh does it. Have a look at the
>>>      
>>>
>>ConfigLoader.
>>
>>
>>>Cheers,
>>>Mathias
>>>
>>>- Original Message -
>>>From: "Anthony Eden" <[EMAIL PROTECTED]>
>>>To: <[EMAIL PROTECTED]>
>>>Sent: Wednesday, June 11, 2003 10:44 PM
>>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
>>>
>>>
>>>  
>>>
>>>>There is an interesting problem with using the ClassLoader or the
>>>>ServletContext for getting resource data: there is no way using the
>>>>
>>>>
>>APIs
>>
>>
>>>>to determine if the resource has been modified.
>>>>
>>>>One workaround is to check the getRealPath() method to see if it is
>>>>available and use it if it is to build a real file object which you
>>>>
>>>>
>>can
>>
>>
>>>>use to determine the last modified date.  Another possibility is to
>>>>specify a reload interval for the resource.
>>>>
>>>>Does XWork (and/or WW2) provide either of these methods for
>>>>
>>>>
>>reloading
>>
>>
>>>>configuration resources?
>>>>
>>>>-Anthony
>>>>
>>>>[EMAIL PROTECTED] wrote:
>>>>
>>>>
>>>>>Ah, I see.  That makes sense.  So, you are doing it based on the
>>>>>  
>>>>>
>>servlet
>>
>>
>>>>>context class loader.  Kewl, glad to learn that.
>>>>>
>>>>>LES
>>>>>
>>>>>-Original Message-
>>>>>From: Anthony Eden [mailto:[EMAIL PROTECTED]
>>>>>Sent: Wednesday, June 11, 2003 2:54 PM
>>>>>To: [EMAIL PROTECTED]
>>>>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
>>>>>
>>>>>You don't need to open an HTTP connection, rather you can get the
>>>>>InputStream directly from the servlet context:
>>>>>
>>>>>InputStream in =
>>>>>

Re: [OS-webwork] Configuration in /WEB-INF

2003-06-12 Thread Philipp Meier
On Wed, Jun 11, 2003 at 04:44:55PM -0400, Anthony Eden wrote:
> There is an interesting problem with using the ClassLoader or the 
> ServletContext for getting resource data: there is no way using the APIs 
> to determine if the resource has been modified.

To my understanding, it is the job of the servlet container the give you
the newest version of the resource. At least if the container provides
live reloading of your web application, like JBoss does e.g. and it's
turned on.

-billy.

-- 
Meisterbohne   Meisterbohne GbR, Küfner,Mekle, MeierTel: +49-731-399 499-0
   eLösungen   Söflinger Straße 100 Fax: +49-731-399 499-9
   89077 Ulm   http://www.meisterbohne.de/


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] Configuration in /WEB-INF

2003-06-12 Thread BOGAERT Mathias
Exactly my point. So this is a good solution after all. Should we vote on
this or something?

Also, we should change xwork.xml to webwork.xml (but still support xwork.xml
in the classpath).

Mathias

-Original Message-
From: Anthony Eden [mailto:[EMAIL PROTECTED] 
Sent: donderdag 12 juni 2003 4:32
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF


Upon further reflection I believe that there is actually no problem with 
using getRealPath() in conjunction with getResourceAsString(), and here 
is why:

 If getRealPath() returns null then it means that you are using an 
packed WAR and you wouldn't be expected to modify and reload a resource 
without redeploying the WAR.  Therefore you can use getResourceAsStream().

 If getRealPath() returns a valid value then you are using an unpacked 
WAR and thus you may modify a resource and want to reload it without 
restarting the server.  Therefore you can use getRealPath() to create a 
File object and determine the last modified time.

Sincerely,
Anthony Eden

Pat Lightbody wrote:

>Sounds to me like this is not a good plan then.
>
>
>- Original Message -
>From: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, June 11, 2003 3:48 PM
>Subject: RE: [OS-webwork] Configuration in /WEB-INF
>
>
>  
>
>>According to the servlet spec getRealPath() will always return null if 
>>the web application is executing in an non-unpacked war.  So, in 
>>general this is not an option for a servlet or any j2ee application.
>>
>>LES
>>
>>
>>-Original Message-
>>From: Pat Lightbody [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, June 11, 2003 5:19 PM
>>To: [EMAIL PROTECTED]
>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
>>
>>Isn't getRealPath() deprecated though?
>>
>>-Pat
>>
>>----- Original Message -----
>>From: "Mathias Bogaert" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Wednesday, June 11, 2003 2:06 PM
>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
>>
>>
>>
>>
>>>This is exactly the way SiteMesh does it. Have a look at the
>>>      
>>>
>>ConfigLoader.
>>
>>
>>>Cheers,
>>>Mathias
>>>
>>>- Original Message -
>>>From: "Anthony Eden" <[EMAIL PROTECTED]>
>>>To: <[EMAIL PROTECTED]>
>>>Sent: Wednesday, June 11, 2003 10:44 PM
>>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
>>>
>>>
>>>  
>>>
>>>>There is an interesting problem with using the ClassLoader or the 
>>>>ServletContext for getting resource data: there is no way using the
>>>>
>>>>
>>APIs
>>
>>
>>>>to determine if the resource has been modified.
>>>>
>>>>One workaround is to check the getRealPath() method to see if it is 
>>>>available and use it if it is to build a real file object which you
>>>>
>>>>
>>can
>>
>>
>>>>use to determine the last modified date.  Another possibility is to 
>>>>specify a reload interval for the resource.
>>>>
>>>>Does XWork (and/or WW2) provide either of these methods for
>>>>
>>>>
>>reloading
>>
>>
>>>>configuration resources?
>>>>
>>>>-Anthony
>>>>
>>>>[EMAIL PROTECTED] wrote:
>>>>
>>>>
>>>>>Ah, I see.  That makes sense.  So, you are doing it based on the
>>>>>  
>>>>>
>>servlet
>>
>>
>>>>>context class loader.  Kewl, glad to learn that.
>>>>>
>>>>>LES
>>>>>
>>>>>-Original Message-
>>>>>From: Anthony Eden [mailto:[EMAIL PROTECTED]
>>>>>Sent: Wednesday, June 11, 2003 2:54 PM
>>>>>To: [EMAIL PROTECTED]
>>>>>Subject: Re: [OS-webwork] Configuration in /WEB-INF
>>>>>
>>>>>You don't need to open an HTTP connection, rather you can get the 
>>>>>InputStream directly from the servlet context:
>>>>>
>>>>>InputStream in = 
>>>>>servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
>>>>>
>>>>>Sincerely,
>>>>>Anthony Eden
>>>>>
>>>>>[EMAIL PROTECTED] wrote:
>>>>>
>>>>>  
>>>>>
>&

Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Anthony Eden
Read my original message again: this is a problem which exists for 
loading resources through both classloaders and the servlet context.  If 
you want something which will always work then you must use interval 
reloading.  However this means that you have to have a thread which is 
running to load the resource at a regular basis and this too can be a 
problem if you are running in a J2EE container.  There is no good 
solution at this time, i.e. nothing provided by the APIs, but you should 
probably use something (or at least give users the option to use something).

Sincerely,
Anthony Eden
Pat Lightbody wrote:

Sounds to me like this is not a good plan then.

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 3:48 PM
Subject: RE: [OS-webwork] Configuration in /WEB-INF

 

According to the servlet spec getRealPath() will always return null if
the web application is executing in an non-unpacked war.  So, in general
this is not an option for a servlet or any j2ee application.
LES

-Original Message-
From: Pat Lightbody [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2003 5:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

Isn't getRealPath() deprecated though?

-Pat

- Original Message -
From: "Mathias Bogaert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 2:06 PM
Subject: Re: [OS-webwork] Configuration in /WEB-INF
   

This is exactly the way SiteMesh does it. Have a look at the
 

ConfigLoader.
   

Cheers,
Mathias
- Original Message -
From: "Anthony Eden" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 10:44 PM
Subject: Re: [OS-webwork] Configuration in /WEB-INF
 

There is an interesting problem with using the ClassLoader or the
ServletContext for getting resource data: there is no way using the
   

APIs
   

to determine if the resource has been modified.

One workaround is to check the getRealPath() method to see if it is
available and use it if it is to build a real file object which you
   

can
   

use to determine the last modified date.  Another possibility is to
specify a reload interval for the resource.
Does XWork (and/or WW2) provide either of these methods for
   

reloading
   

configuration resources?

-Anthony

[EMAIL PROTECTED] wrote:
   

Ah, I see.  That makes sense.  So, you are doing it based on the
 

servlet
   

context class loader.  Kewl, glad to learn that.

LES

-Original Message-
From: Anthony Eden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 2:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF
You don't need to open an HTTP connection, rather you can get the
InputStream directly from the servlet context:
InputStream in =
servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
Sincerely,
Anthony Eden
[EMAIL PROTECTED] wrote:

 

I may just be confused or have missed something, but does
   

getResource
   

not just give you the path relative to the doc root?  Will you
   

then
   

open

 

it using http? Normally, would you not secure your web-inf from
   

url
   

access(for security reasons)? Or is there another method that
   

would
   

allow you to actually use File (by getting the servlets
   

"realpath")?
   

LES

-Original Message-
From: Hani Suleiman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 9:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF
getRealPath is very bad, what's so wrong with
servletContext.getResource() though?
On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
   

wrote:

 

The hardest problem with that is that you can't use
context.getRealPath() to get the location of WEB-INF in an
 

unpacked
   

war

   

config (per servlet spec).  Honestly, classpath is usually the
 

best
   

solution.

-Original Message-
From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 6:55 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Configuration in /WEB-INF
Guys,

It seems like we are having a lot of problems with finding
configuration
files in the classpath etc. Also, I dislike putting configuration
 

files

   

other than .properties on the classpath. That's why I propose
 

putting
   

it
all
(components.xml, xwork.xml etc)under /WEB-INF directly (same as
SiteMesh
for
example).
+1 from me

Mathias



---
This SF.net email is sponsored by:  Etnus, makers of TotalView,
 

The
   

best
thread debugger on the planet. Designed with thread debugging
 

features
   

you've never dreamed of, try Total

Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Anthony Eden
Upon further reflection I believe that there is actually no problem with 
using getRealPath() in conjunction with getResourceAsString(), and here 
is why:

If getRealPath() returns null then it means that you are using an 
packed WAR and you wouldn't be expected to modify and reload a resource 
without redeploying the WAR.  Therefore you can use getResourceAsStream().

If getRealPath() returns a valid value then you are using an unpacked 
WAR and thus you may modify a resource and want to reload it without 
restarting the server.  Therefore you can use getRealPath() to create a 
File object and determine the last modified time.

Sincerely,
Anthony Eden
Pat Lightbody wrote:

Sounds to me like this is not a good plan then.

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 3:48 PM
Subject: RE: [OS-webwork] Configuration in /WEB-INF

 

According to the servlet spec getRealPath() will always return null if
the web application is executing in an non-unpacked war.  So, in general
this is not an option for a servlet or any j2ee application.
LES

-Original Message-
From: Pat Lightbody [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2003 5:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

Isn't getRealPath() deprecated though?

-Pat

- Original Message -
From: "Mathias Bogaert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 2:06 PM
Subject: Re: [OS-webwork] Configuration in /WEB-INF
   

This is exactly the way SiteMesh does it. Have a look at the
 

ConfigLoader.
   

Cheers,
Mathias
- Original Message -
From: "Anthony Eden" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 10:44 PM
Subject: Re: [OS-webwork] Configuration in /WEB-INF
 

There is an interesting problem with using the ClassLoader or the
ServletContext for getting resource data: there is no way using the
   

APIs
   

to determine if the resource has been modified.

One workaround is to check the getRealPath() method to see if it is
available and use it if it is to build a real file object which you
   

can
   

use to determine the last modified date.  Another possibility is to
specify a reload interval for the resource.
Does XWork (and/or WW2) provide either of these methods for
   

reloading
   

configuration resources?

-Anthony

[EMAIL PROTECTED] wrote:
   

Ah, I see.  That makes sense.  So, you are doing it based on the
 

servlet
   

context class loader.  Kewl, glad to learn that.

LES

-Original Message-
From: Anthony Eden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 2:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF
You don't need to open an HTTP connection, rather you can get the
InputStream directly from the servlet context:
InputStream in =
servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
Sincerely,
Anthony Eden
[EMAIL PROTECTED] wrote:

 

I may just be confused or have missed something, but does
   

getResource
   

not just give you the path relative to the doc root?  Will you
   

then
   

open

 

it using http? Normally, would you not secure your web-inf from
   

url
   

access(for security reasons)? Or is there another method that
   

would
   

allow you to actually use File (by getting the servlets
   

"realpath")?
   

LES

-Original Message-
From: Hani Suleiman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 9:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF
getRealPath is very bad, what's so wrong with
servletContext.getResource() though?
On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
   

wrote:

 

The hardest problem with that is that you can't use
context.getRealPath() to get the location of WEB-INF in an
 

unpacked
   

war

   

config (per servlet spec).  Honestly, classpath is usually the
 

best
   

solution.

-Original Message-
From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 6:55 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Configuration in /WEB-INF
Guys,

It seems like we are having a lot of problems with finding
configuration
files in the classpath etc. Also, I dislike putting configuration
 

files

   

other than .properties on the classpath. That's why I propose
 

putting
   

it
all
(components.xml, xwork.xml etc)under /WEB-INF directly (same as
SiteMesh
for
example).
+1 from me

Mathias



---
This SF.net email is sponsored by:  Etnus, makers of TotalView,
 

The
   

best
thread debugger on the planet. Designed with th

Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Pat Lightbody
Sounds to me like this is not a good plan then.


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 3:48 PM
Subject: RE: [OS-webwork] Configuration in /WEB-INF


> According to the servlet spec getRealPath() will always return null if
> the web application is executing in an non-unpacked war.  So, in general
> this is not an option for a servlet or any j2ee application.
> 
> LES
> 
> 
> -Original Message-
> From: Pat Lightbody [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 11, 2003 5:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] Configuration in /WEB-INF
> 
> Isn't getRealPath() deprecated though?
> 
> -Pat
> 
> - Original Message -
> From: "Mathias Bogaert" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 11, 2003 2:06 PM
> Subject: Re: [OS-webwork] Configuration in /WEB-INF
> 
> 
> > This is exactly the way SiteMesh does it. Have a look at the
> ConfigLoader.
> >
> > Cheers,
> > Mathias
> >
> > - Original Message -----
> > From: "Anthony Eden" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 11, 2003 10:44 PM
> > Subject: Re: [OS-webwork] Configuration in /WEB-INF
> >
> >
> > > There is an interesting problem with using the ClassLoader or the
> > > ServletContext for getting resource data: there is no way using the
> APIs
> > > to determine if the resource has been modified.
> > >
> > > One workaround is to check the getRealPath() method to see if it is
> > > available and use it if it is to build a real file object which you
> can
> > > use to determine the last modified date.  Another possibility is to
> > > specify a reload interval for the resource.
> > >
> > > Does XWork (and/or WW2) provide either of these methods for
> reloading
> > > configuration resources?
> > >
> > > -Anthony
> > >
> > > [EMAIL PROTECTED] wrote:
> > > > Ah, I see.  That makes sense.  So, you are doing it based on the
> servlet
> > > > context class loader.  Kewl, glad to learn that.
> > > >
> > > > LES
> > > >
> > > > -Original Message-
> > > > From: Anthony Eden [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, June 11, 2003 2:54 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [OS-webwork] Configuration in /WEB-INF
> > > >
> > > > You don't need to open an HTTP connection, rather you can get the
> > > > InputStream directly from the servlet context:
> > > >
> > > > InputStream in =
> > > > servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
> > > >
> > > > Sincerely,
> > > > Anthony Eden
> > > >
> > > > [EMAIL PROTECTED] wrote:
> > > >
> > > >>I may just be confused or have missed something, but does
> getResource
> > > >>not just give you the path relative to the doc root?  Will you
> then
> > > >
> > > > open
> > > >
> > > >>it using http? Normally, would you not secure your web-inf from
> url
> > > >>access(for security reasons)? Or is there another method that
> would
> > > >>allow you to actually use File (by getting the servlets
> "realpath")?
> > > >>
> > > >>LES
> > > >>
> > > >>-Original Message-
> > > >>From: Hani Suleiman [mailto:[EMAIL PROTECTED]
> > > >>Sent: Tuesday, June 10, 2003 9:44 PM
> > > >>To: [EMAIL PROTECTED]
> > > >>Subject: Re: [OS-webwork] Configuration in /WEB-INF
> > > >>
> > > >>getRealPath is very bad, what's so wrong with
> > > >>servletContext.getResource() though?
> > > >>
> > > >>On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
> > > >
> > > > wrote:
> > > >
> > > >>
> > > >>>The hardest problem with that is that you can't use
> > > >>>context.getRealPath() to get the location of WEB-INF in an
> unpacked
> > > >>
> > > >>war
> > > >>
> > > >>
> > > >>>config (per servlet spec).  Honestly, classpath is usually the
> best
> > > >>>solution.
> > > >>>
&g

RE: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Les . Stroud
According to the servlet spec getRealPath() will always return null if
the web application is executing in an non-unpacked war.  So, in general
this is not an option for a servlet or any j2ee application.

LES


-Original Message-
From: Pat Lightbody [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2003 5:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

Isn't getRealPath() deprecated though?

-Pat

- Original Message -
From: "Mathias Bogaert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 2:06 PM
Subject: Re: [OS-webwork] Configuration in /WEB-INF


> This is exactly the way SiteMesh does it. Have a look at the
ConfigLoader.
>
> Cheers,
> Mathias
>
> - Original Message -
> From: "Anthony Eden" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 11, 2003 10:44 PM
> Subject: Re: [OS-webwork] Configuration in /WEB-INF
>
>
> > There is an interesting problem with using the ClassLoader or the
> > ServletContext for getting resource data: there is no way using the
APIs
> > to determine if the resource has been modified.
> >
> > One workaround is to check the getRealPath() method to see if it is
> > available and use it if it is to build a real file object which you
can
> > use to determine the last modified date.  Another possibility is to
> > specify a reload interval for the resource.
> >
> > Does XWork (and/or WW2) provide either of these methods for
reloading
> > configuration resources?
> >
> > -Anthony
> >
> > [EMAIL PROTECTED] wrote:
> > > Ah, I see.  That makes sense.  So, you are doing it based on the
servlet
> > > context class loader.  Kewl, glad to learn that.
> > >
> > > LES
> > >
> > > -Original Message-
> > > From: Anthony Eden [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, June 11, 2003 2:54 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [OS-webwork] Configuration in /WEB-INF
> > >
> > > You don't need to open an HTTP connection, rather you can get the
> > > InputStream directly from the servlet context:
> > >
> > > InputStream in =
> > > servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
> > >
> > > Sincerely,
> > > Anthony Eden
> > >
> > > [EMAIL PROTECTED] wrote:
> > >
> > >>I may just be confused or have missed something, but does
getResource
> > >>not just give you the path relative to the doc root?  Will you
then
> > >
> > > open
> > >
> > >>it using http? Normally, would you not secure your web-inf from
url
> > >>access(for security reasons)? Or is there another method that
would
> > >>allow you to actually use File (by getting the servlets
"realpath")?
> > >>
> > >>LES
> > >>
> > >>-Original Message-
> > >>From: Hani Suleiman [mailto:[EMAIL PROTECTED]
> > >>Sent: Tuesday, June 10, 2003 9:44 PM
> > >>To: [EMAIL PROTECTED]
> > >>Subject: Re: [OS-webwork] Configuration in /WEB-INF
> > >>
> > >>getRealPath is very bad, what's so wrong with
> > >>servletContext.getResource() though?
> > >>
> > >>On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
> > >
> > > wrote:
> > >
> > >>
> > >>>The hardest problem with that is that you can't use
> > >>>context.getRealPath() to get the location of WEB-INF in an
unpacked
> > >>
> > >>war
> > >>
> > >>
> > >>>config (per servlet spec).  Honestly, classpath is usually the
best
> > >>>solution.
> > >>>
> > >>>-Original Message-
> > >>>From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
> > >>>Sent: Tuesday, June 10, 2003 6:55 PM
> > >>>To: [EMAIL PROTECTED]
> > >>>Subject: [OS-webwork] Configuration in /WEB-INF
> > >>>
> > >>>Guys,
> > >>>
> > >>>It seems like we are having a lot of problems with finding
> > >>>configuration
> > >>>files in the classpath etc. Also, I dislike putting configuration
> > >>
> > >>files
> > >>
> > >>
> > >>>other than .properties on the classpath. That's why I propose
putting
> > >>>it
> > >>>all
> > >>>(compon

Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Mathias Bogaert
Not according to the Servlet 2.4 spec:

http://cvs.apache.org/viewcvs/jakarta-servletapi-5/jsr154/src/share/javax/se
rvlet/ServletContext.java?rev=1.3&content-type=text/vnd.viewcvs-markup

Mathias

- Original Message -
From: "Pat Lightbody" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 11:19 PM
Subject: Re: [OS-webwork] Configuration in /WEB-INF


> Isn't getRealPath() deprecated though?
>
> -Pat
>
> - Original Message -
> From: "Mathias Bogaert" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 11, 2003 2:06 PM
> Subject: Re: [OS-webwork] Configuration in /WEB-INF
>
>
> > This is exactly the way SiteMesh does it. Have a look at the
ConfigLoader.
> >
> > Cheers,
> > Mathias
> >
> > - Original Message -
> > From: "Anthony Eden" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 11, 2003 10:44 PM
> > Subject: Re: [OS-webwork] Configuration in /WEB-INF
> >
> >
> > > There is an interesting problem with using the ClassLoader or the
> > > ServletContext for getting resource data: there is no way using the
APIs
> > > to determine if the resource has been modified.
> > >
> > > One workaround is to check the getRealPath() method to see if it is
> > > available and use it if it is to build a real file object which you
can
> > > use to determine the last modified date.  Another possibility is to
> > > specify a reload interval for the resource.
> > >
> > > Does XWork (and/or WW2) provide either of these methods for reloading
> > > configuration resources?
> > >
> > > -Anthony
> > >
> > > [EMAIL PROTECTED] wrote:
> > > > Ah, I see.  That makes sense.  So, you are doing it based on the
> servlet
> > > > context class loader.  Kewl, glad to learn that.
> > > >
> > > > LES
> > > >
> > > > -Original Message-
> > > > From: Anthony Eden [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, June 11, 2003 2:54 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [OS-webwork] Configuration in /WEB-INF
> > > >
> > > > You don't need to open an HTTP connection, rather you can get the
> > > > InputStream directly from the servlet context:
> > > >
> > > > InputStream in =
> > > > servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
> > > >
> > > > Sincerely,
> > > > Anthony Eden
> > > >
> > > > [EMAIL PROTECTED] wrote:
> > > >
> > > >>I may just be confused or have missed something, but does
getResource
> > > >>not just give you the path relative to the doc root?  Will you then
> > > >
> > > > open
> > > >
> > > >>it using http? Normally, would you not secure your web-inf from url
> > > >>access(for security reasons)? Or is there another method that would
> > > >>allow you to actually use File (by getting the servlets "realpath")?
> > > >>
> > > >>LES
> > > >>
> > > >>-Original Message-
> > > >>From: Hani Suleiman [mailto:[EMAIL PROTECTED]
> > > >>Sent: Tuesday, June 10, 2003 9:44 PM
> > > >>To: [EMAIL PROTECTED]
> > > >>Subject: Re: [OS-webwork] Configuration in /WEB-INF
> > > >>
> > > >>getRealPath is very bad, what's so wrong with
> > > >>servletContext.getResource() though?
> > > >>
> > > >>On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
> > > >
> > > > wrote:
> > > >
> > > >>
> > > >>>The hardest problem with that is that you can't use
> > > >>>context.getRealPath() to get the location of WEB-INF in an unpacked
> > > >>
> > > >>war
> > > >>
> > > >>
> > > >>>config (per servlet spec).  Honestly, classpath is usually the best
> > > >>>solution.
> > > >>>
> > > >>>-Original Message-
> > > >>>From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
> > > >>>Sent: Tuesday, June 10, 2003 6:55 PM
> > > >>>To: [EMAIL PROTECTED]
> > > >>>Subject: [OS-webwork] Configuration in /WEB-INF
> > > >>>
&g

Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Pat Lightbody
Isn't getRealPath() deprecated though?

-Pat

- Original Message -
From: "Mathias Bogaert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 2:06 PM
Subject: Re: [OS-webwork] Configuration in /WEB-INF


> This is exactly the way SiteMesh does it. Have a look at the ConfigLoader.
>
> Cheers,
> Mathias
>
> - Original Message -
> From: "Anthony Eden" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 11, 2003 10:44 PM
> Subject: Re: [OS-webwork] Configuration in /WEB-INF
>
>
> > There is an interesting problem with using the ClassLoader or the
> > ServletContext for getting resource data: there is no way using the APIs
> > to determine if the resource has been modified.
> >
> > One workaround is to check the getRealPath() method to see if it is
> > available and use it if it is to build a real file object which you can
> > use to determine the last modified date.  Another possibility is to
> > specify a reload interval for the resource.
> >
> > Does XWork (and/or WW2) provide either of these methods for reloading
> > configuration resources?
> >
> > -Anthony
> >
> > [EMAIL PROTECTED] wrote:
> > > Ah, I see.  That makes sense.  So, you are doing it based on the
servlet
> > > context class loader.  Kewl, glad to learn that.
> > >
> > > LES
> > >
> > > -Original Message-
> > > From: Anthony Eden [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, June 11, 2003 2:54 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [OS-webwork] Configuration in /WEB-INF
> > >
> > > You don't need to open an HTTP connection, rather you can get the
> > > InputStream directly from the servlet context:
> > >
> > > InputStream in =
> > > servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
> > >
> > > Sincerely,
> > > Anthony Eden
> > >
> > > [EMAIL PROTECTED] wrote:
> > >
> > >>I may just be confused or have missed something, but does getResource
> > >>not just give you the path relative to the doc root?  Will you then
> > >
> > > open
> > >
> > >>it using http? Normally, would you not secure your web-inf from url
> > >>access(for security reasons)? Or is there another method that would
> > >>allow you to actually use File (by getting the servlets "realpath")?
> > >>
> > >>LES
> > >>
> > >>-Original Message-
> > >>From: Hani Suleiman [mailto:[EMAIL PROTECTED]
> > >>Sent: Tuesday, June 10, 2003 9:44 PM
> > >>To: [EMAIL PROTECTED]
> > >>Subject: Re: [OS-webwork] Configuration in /WEB-INF
> > >>
> > >>getRealPath is very bad, what's so wrong with
> > >>servletContext.getResource() though?
> > >>
> > >>On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
> > >
> > > wrote:
> > >
> > >>
> > >>>The hardest problem with that is that you can't use
> > >>>context.getRealPath() to get the location of WEB-INF in an unpacked
> > >>
> > >>war
> > >>
> > >>
> > >>>config (per servlet spec).  Honestly, classpath is usually the best
> > >>>solution.
> > >>>
> > >>>-Original Message-
> > >>>From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
> > >>>Sent: Tuesday, June 10, 2003 6:55 PM
> > >>>To: [EMAIL PROTECTED]
> > >>>Subject: [OS-webwork] Configuration in /WEB-INF
> > >>>
> > >>>Guys,
> > >>>
> > >>>It seems like we are having a lot of problems with finding
> > >>>configuration
> > >>>files in the classpath etc. Also, I dislike putting configuration
> > >>
> > >>files
> > >>
> > >>
> > >>>other than .properties on the classpath. That's why I propose putting
> > >>>it
> > >>>all
> > >>>(components.xml, xwork.xml etc)under /WEB-INF directly (same as
> > >>>SiteMesh
> > >>>for
> > >>>example).
> > >>>
> > >>>+1 from me
> > >>>
> > >>>Mathias
> > >>>
> > >>>
> > >>>
> > >>>--

Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Mathias Bogaert
This is exactly the way SiteMesh does it. Have a look at the ConfigLoader.

Cheers,
Mathias

- Original Message -
From: "Anthony Eden" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 10:44 PM
Subject: Re: [OS-webwork] Configuration in /WEB-INF


> There is an interesting problem with using the ClassLoader or the
> ServletContext for getting resource data: there is no way using the APIs
> to determine if the resource has been modified.
>
> One workaround is to check the getRealPath() method to see if it is
> available and use it if it is to build a real file object which you can
> use to determine the last modified date.  Another possibility is to
> specify a reload interval for the resource.
>
> Does XWork (and/or WW2) provide either of these methods for reloading
> configuration resources?
>
> -Anthony
>
> [EMAIL PROTECTED] wrote:
> > Ah, I see.  That makes sense.  So, you are doing it based on the servlet
> > context class loader.  Kewl, glad to learn that.
> >
> > LES
> >
> > -Original Message-
> > From: Anthony Eden [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 11, 2003 2:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [OS-webwork] Configuration in /WEB-INF
> >
> > You don't need to open an HTTP connection, rather you can get the
> > InputStream directly from the servlet context:
> >
> > InputStream in =
> > servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
> >
> > Sincerely,
> > Anthony Eden
> >
> > [EMAIL PROTECTED] wrote:
> >
> >>I may just be confused or have missed something, but does getResource
> >>not just give you the path relative to the doc root?  Will you then
> >
> > open
> >
> >>it using http? Normally, would you not secure your web-inf from url
> >>access(for security reasons)? Or is there another method that would
> >>allow you to actually use File (by getting the servlets "realpath")?
> >>
> >>LES
> >>
> >>-Original Message-
> >>From: Hani Suleiman [mailto:[EMAIL PROTECTED]
> >>Sent: Tuesday, June 10, 2003 9:44 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: [OS-webwork] Configuration in /WEB-INF
> >>
> >>getRealPath is very bad, what's so wrong with
> >>servletContext.getResource() though?
> >>
> >>On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
> >
> > wrote:
> >
> >>
> >>>The hardest problem with that is that you can't use
> >>>context.getRealPath() to get the location of WEB-INF in an unpacked
> >>
> >>war
> >>
> >>
> >>>config (per servlet spec).  Honestly, classpath is usually the best
> >>>solution.
> >>>
> >>>-Original Message-
> >>>From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
> >>>Sent: Tuesday, June 10, 2003 6:55 PM
> >>>To: [EMAIL PROTECTED]
> >>>Subject: [OS-webwork] Configuration in /WEB-INF
> >>>
> >>>Guys,
> >>>
> >>>It seems like we are having a lot of problems with finding
> >>>configuration
> >>>files in the classpath etc. Also, I dislike putting configuration
> >>
> >>files
> >>
> >>
> >>>other than .properties on the classpath. That's why I propose putting
> >>>it
> >>>all
> >>>(components.xml, xwork.xml etc)under /WEB-INF directly (same as
> >>>SiteMesh
> >>>for
> >>>example).
> >>>
> >>>+1 from me
> >>>
> >>>Mathias
> >>>
> >>>
> >>>
> >>>---
> >>>This SF.net email is sponsored by:  Etnus, makers of TotalView, The
> >>>best
> >>>thread debugger on the planet. Designed with thread debugging features
> >>>you've never dreamed of, try TotalView 6 free at www.etnus.com.
> >>>___
> >>>Opensymphony-webwork mailing list
> >>>[EMAIL PROTECTED]
> >>>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> >>>
> >>>
> >>>---
> >>>This SF.net email is sponsored by:  Etnus, makers of TotalView, The
> >>>best
> >>>thread debugger on the planet. Designed with thread debugging features
> >

Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Anthony Eden
There is an interesting problem with using the ClassLoader or the 
ServletContext for getting resource data: there is no way using the APIs 
to determine if the resource has been modified.

One workaround is to check the getRealPath() method to see if it is 
available and use it if it is to build a real file object which you can 
use to determine the last modified date.  Another possibility is to 
specify a reload interval for the resource.

Does XWork (and/or WW2) provide either of these methods for reloading 
configuration resources?

-Anthony

[EMAIL PROTECTED] wrote:
Ah, I see.  That makes sense.  So, you are doing it based on the servlet
context class loader.  Kewl, glad to learn that.
LES

-Original Message-
From: Anthony Eden [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2003 2:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

You don't need to open an HTTP connection, rather you can get the 
InputStream directly from the servlet context:

InputStream in =
servletContext.getResourceAsStream("/WEB-INF/xwork.xml");
Sincerely,
Anthony Eden
[EMAIL PROTECTED] wrote:

I may just be confused or have missed something, but does getResource
not just give you the path relative to the doc root?  Will you then
open

it using http? Normally, would you not secure your web-inf from url
access(for security reasons)? Or is there another method that would
allow you to actually use File (by getting the servlets "realpath")?
LES

-Original Message-
From: Hani Suleiman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2003 9:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

getRealPath is very bad, what's so wrong with 
servletContext.getResource() though?

On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
wrote:


The hardest problem with that is that you can't use
context.getRealPath() to get the location of WEB-INF in an unpacked
war


config (per servlet spec).  Honestly, classpath is usually the best
solution.
-Original Message-
From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 6:55 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Configuration in /WEB-INF
Guys,

It seems like we are having a lot of problems with finding 
configuration
files in the classpath etc. Also, I dislike putting configuration
files


other than .properties on the classpath. That's why I propose putting 
it
all
(components.xml, xwork.xml etc)under /WEB-INF directly (same as 
SiteMesh
for
example).

+1 from me

Mathias



---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork




---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---

RE: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Les . Stroud
Ah, I see.  That makes sense.  So, you are doing it based on the servlet
context class loader.  Kewl, glad to learn that.

LES

-Original Message-
From: Anthony Eden [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2003 2:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

You don't need to open an HTTP connection, rather you can get the 
InputStream directly from the servlet context:

InputStream in =
servletContext.getResourceAsStream("/WEB-INF/xwork.xml");

Sincerely,
Anthony Eden

[EMAIL PROTECTED] wrote:
> I may just be confused or have missed something, but does getResource
> not just give you the path relative to the doc root?  Will you then
open
> it using http? Normally, would you not secure your web-inf from url
> access(for security reasons)? Or is there another method that would
> allow you to actually use File (by getting the servlets "realpath")?
> 
> LES
> 
> -Original Message-
> From: Hani Suleiman [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 10, 2003 9:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] Configuration in /WEB-INF
> 
> getRealPath is very bad, what's so wrong with 
> servletContext.getResource() though?
> 
> On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED]
wrote:
> 
> 
>>The hardest problem with that is that you can't use
>>context.getRealPath() to get the location of WEB-INF in an unpacked
> 
> war
> 
>>config (per servlet spec).  Honestly, classpath is usually the best
>>solution.
>>
>>-Original Message-
>>From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
>>Sent: Tuesday, June 10, 2003 6:55 PM
>>To: [EMAIL PROTECTED]
>>Subject: [OS-webwork] Configuration in /WEB-INF
>>
>>Guys,
>>
>>It seems like we are having a lot of problems with finding 
>>configuration
>>files in the classpath etc. Also, I dislike putting configuration
> 
> files
> 
>>other than .properties on the classpath. That's why I propose putting 
>>it
>>all
>>(components.xml, xwork.xml etc)under /WEB-INF directly (same as 
>>SiteMesh
>>for
>>example).
>>
>>+1 from me
>>
>>Mathias
>>
>>
>>
>>---
>>This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
>>best
>>thread debugger on the planet. Designed with thread debugging features
>>you've never dreamed of, try TotalView 6 free at www.etnus.com.
>>___
>>Opensymphony-webwork mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>>
>>
>>---
>>This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
>>best
>>thread debugger on the planet. Designed with thread debugging features
>>you've never dreamed of, try TotalView 6 free at www.etnus.com.
>>___
>>Opensymphony-webwork mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>>
> 
> 
> 
> 
> ---
> This SF.NET email is sponsored by: eBay
> Great deals on office technology -- on eBay now! Click here:
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> ___
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 
> ---
> This SF.NET email is sponsored by: eBay
> Great deals on office technology -- on eBay now! Click here:
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> ___
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Fredrik Lindgren
Files stored under WEB-INF should not be accessible from external 
requests according to the servlet spec. They can however be accessed 
using servletContext.getResource(). This will return a URL instance. The 
spec does not specify a concrete URL subclass so HTTP should not be 
assumed. IMO WEB-INF is a good place to put configuration files for 
web-apps. A limitation compared to file access is that you are normally 
not able to modify the resource.

/Fredrik Lindgren

[EMAIL PROTECTED] wrote:
I may just be confused or have missed something, but does getResource
not just give you the path relative to the doc root?  Will you then open
it using http? Normally, would you not secure your web-inf from url
access(for security reasons)? Or is there another method that would
allow you to actually use File (by getting the servlets "realpath")?
LES

-Original Message-
From: Hani Suleiman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2003 9:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

getRealPath is very bad, what's so wrong with 
servletContext.getResource() though?

On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED] wrote:


The hardest problem with that is that you can't use
context.getRealPath() to get the location of WEB-INF in an unpacked
war

config (per servlet spec).  Honestly, classpath is usually the best
solution.
-Original Message-
From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 6:55 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Configuration in /WEB-INF
Guys,

It seems like we are having a lot of problems with finding 
configuration
files in the classpath etc. Also, I dislike putting configuration
files

other than .properties on the classpath. That's why I propose putting 
it
all
(components.xml, xwork.xml etc)under /WEB-INF directly (same as 
SiteMesh
for
example).

+1 from me

Mathias



---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Anthony Eden
You don't need to open an HTTP connection, rather you can get the 
InputStream directly from the servlet context:

InputStream in = servletContext.getResourceAsStream("/WEB-INF/xwork.xml");

Sincerely,
Anthony Eden
[EMAIL PROTECTED] wrote:
I may just be confused or have missed something, but does getResource
not just give you the path relative to the doc root?  Will you then open
it using http? Normally, would you not secure your web-inf from url
access(for security reasons)? Or is there another method that would
allow you to actually use File (by getting the servlets "realpath")?
LES

-Original Message-
From: Hani Suleiman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2003 9:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

getRealPath is very bad, what's so wrong with 
servletContext.getResource() though?

On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED] wrote:


The hardest problem with that is that you can't use
context.getRealPath() to get the location of WEB-INF in an unpacked
war

config (per servlet spec).  Honestly, classpath is usually the best
solution.
-Original Message-
From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 6:55 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Configuration in /WEB-INF
Guys,

It seems like we are having a lot of problems with finding 
configuration
files in the classpath etc. Also, I dislike putting configuration
files

other than .properties on the classpath. That's why I propose putting 
it
all
(components.xml, xwork.xml etc)under /WEB-INF directly (same as 
SiteMesh
for
example).

+1 from me

Mathias



---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Les . Stroud
I may just be confused or have missed something, but does getResource
not just give you the path relative to the doc root?  Will you then open
it using http? Normally, would you not secure your web-inf from url
access(for security reasons)? Or is there another method that would
allow you to actually use File (by getting the servlets "realpath")?

LES

-Original Message-
From: Hani Suleiman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2003 9:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Configuration in /WEB-INF

getRealPath is very bad, what's so wrong with 
servletContext.getResource() though?

On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED] wrote:

> The hardest problem with that is that you can't use
> context.getRealPath() to get the location of WEB-INF in an unpacked
war
> config (per servlet spec).  Honestly, classpath is usually the best
> solution.
>
> -Original Message-
> From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 6:55 PM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] Configuration in /WEB-INF
>
> Guys,
>
> It seems like we are having a lot of problems with finding 
> configuration
> files in the classpath etc. Also, I dislike putting configuration
files
> other than .properties on the classpath. That's why I propose putting 
> it
> all
> (components.xml, xwork.xml etc)under /WEB-INF directly (same as 
> SiteMesh
> for
> example).
>
> +1 from me
>
> Mathias
>
>
>
> ---
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
> best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> ___
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>
>
> ---
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
> best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> ___
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>



---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


Re: [OS-webwork] Configuration in /WEB-INF

2003-06-11 Thread Hani Suleiman
getRealPath is very bad, what's so wrong with 
servletContext.getResource() though?

On Tuesday, June 10, 2003, at 06:59 PM, [EMAIL PROTECTED] wrote:

The hardest problem with that is that you can't use
context.getRealPath() to get the location of WEB-INF in an unpacked war
config (per servlet spec).  Honestly, classpath is usually the best
solution.
-Original Message-
From: Mathias Bogaert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 6:55 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Configuration in /WEB-INF
Guys,

It seems like we are having a lot of problems with finding 
configuration
files in the classpath etc. Also, I dislike putting configuration files
other than .properties on the classpath. That's why I propose putting 
it
all
(components.xml, xwork.xml etc)under /WEB-INF directly (same as 
SiteMesh
for
example).

+1 from me

Mathias



---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The 
best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


RE: [OS-webwork] Configuration in /WEB-INF

2003-06-10 Thread Les . Stroud
The hardest problem with that is that you can't use
context.getRealPath() to get the location of WEB-INF in an unpacked war
config (per servlet spec).  Honestly, classpath is usually the best
solution.

-Original Message-
From: Mathias Bogaert [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2003 6:55 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Configuration in /WEB-INF

Guys,

It seems like we are having a lot of problems with finding configuration
files in the classpath etc. Also, I dislike putting configuration files
other than .properties on the classpath. That's why I propose putting it
all
(components.xml, xwork.xml etc)under /WEB-INF directly (same as SiteMesh
for
example).

+1 from me

Mathias



---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork