cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [C2] Installation problems
Date Sun, 28 Oct 2001 16:11:55 GMT
On Sat, 27 Oct 2001, Stefano Mazzocchi wrote:

> "Piroumian, Konstantin" wrote:
> >
> > Hi, C2ers!
> >
> > As I've written already, I faced a problem installing Cocoon 2.0rc1 on IONA
> > App server. The WAR archive is not unpacked when application is running and
> > this results in problems during servlet initialization, particularly:
> > this.servletContext.getRealPath("/") returns 'null'.
>
> Oh, gosh, didn't notice this in code but using getRealPath is wrong and
> should almost never be used!! (I once proposed to the Servlet JSR to
> deprecate all instances of that method, but it was rejected).
>
> getResource() is always the way to go since it allows the container to
> abstact the location of the resource even in environments were the
> webapps may be distributed in a load-balanced environment.
>
> Please, people, don't assume we will be running in a nice and simple
> tomcat container or the entire reason to make Cocoon a servlet API will
> fail.
>
> > Is there a reason that cocoon.xconf and sitemap.xmap (root) are placed in
> > the context root directory and not inside of the WEB-INF/?
>
> I agree that cocoon.xconf should be placed under WEB-INF. I propose to
> make that the default location, but as for sitemaps, I think the sitemap
> should be placed there since it's not a configuration but part of the
> resources Cocoon uses to operate.
>
> > And why not use getResource() instead of using real path to files?
>
> Yes, exactly.
>
> > If C2 is running from an
> > archive then the real path cannot be used to load files.
>
> And there are a ton of other cases.
>
> Also, it is wrong for a webapp to update something inside its resource
> space (as we do with cocoon.log files). The "work" directories for
> webapps were created exactly for this.
>
> Also, it should be possible for cocoon to log on the servlet log and not
> on external files in order to automate log processing (some people might
> have a syslog-connected servlet container and might want to centralize
> log analysis there).

Cocoon logs on the servlet log automatically (at least wit the current
logkit management configuration) in case of log entries with priority
error and up. There is no problem changing the location of logfiles in
the logkit.xconf file.

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message