cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Duddleston" <da...@i2a.com>
Subject RE: WAR file
Date Sat, 03 Jun 2000 01:31:11 GMT

> > First I think we have to make Cocoon 2 use the Context.getRealPath()
> > everywhere a resource is allocated.
>
> we should try to use getResource() and no real paths at all.

I guess it is a matter of what needs to be accomplished.

File file = new File(context.getRealPath("/WEB-INF/cocoon.xcof"));

InputStream in = new URL(
	context.getResource("/WEB-INF/cocoon.xcof""))
	.openStream(); // or something like this


getRealPath returns a String
Z:\tomcat\webapps\tomcat\web-inf\cocoon\WEB-INF\cocoon.xconf

getResource returns a URL
file:Z:\tomcat\webapps\tomcat/cocoon/web-inf/cocoon.xconf

getResource is the most flexible but getRealPath should work just fine in
most cases.

What do you think.


> > nd after that the XSP problem has to be solved.
>
> I think this is solvable by loading the compiler with a custom
> classloader. The problem is that this would break compiler abstraction
> (means: forget about Jikes compilation!)


Mime
View raw message