shenoy, nitin wrote:

>Hi Folks,
>
>I think Cocoon is a very powerful framework and I respect all the hard work
>and effort that has gone into the making of Cocoon.
>
>Now for my question :)
>
>Is the decision to use ServletConfig.getRealPath in cocoon a good design
>decision? From the Servlet 2.2 spec ..... "when the web application is
>executed from an archive, on a remote file system not accessible locally, or
>in a database, these methods must return null."
>
>BEA Weblogic returns null in a War file format (as most of you folks are
>probably aware already) and a ton of Cocoon users are screaming all over the
>place about not being able to deploy Cocoon in a war format.
>
>I wanna volunteer to try and fix (or is adapt the right word?) Cocoon so
>that it works in war format (only 13 files use the getRealPath method) under
>weblogic but I also think I can do a better job if I understand the
>perspective correctly.
>
Cool ! Here are some inputs, then. There are 4 categories of classes 
that call getRealPath :
1 - classes that *need* a File,
2 - classes that could do equally well with getResource() and need some 
polishing :)
3 - classes that prefer a File, but fall back to a raw URL,
4 - wrappers, that just forward calls.

Only categories 1 & 2 should need some work.

In category 1, you'll mainly find HSQL and LogKit log targets, which 
write some data on disk. For these, the only portable solution I see is 
to use the work directory rather than WEB-INF.

Category 2 has been considered and corrected a few months ago, but some 
new classes added since then may need that polishing.

>
>Please do bear with me if the above topic is a non issue, but I do see a lot
>of postings on the Cocoon users list and the BEA weblogic list.
>
The main issue is using WEB-INF to write data.

Sylvain



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to