tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <r...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/core StandardContext.java StandardHost.java
Date Mon, 22 Jan 2001 00:48:19 GMT
> Remy Maucherat wrote:
>
> > > On 20 Jan 2001 remm@apache.org wrote:
> > >
> > > >   - Add a new "unpackWARs" flag in the StandardHost : if true, the
host
> > will
> > > >     deploy WARs as before. If false, the WARs found in the host path
> > won't
> > > >     be unpacked and the WARDirContext will be used.
> > >
> > > Very very cool.
> >
> > :)
> > I guess I get the award for "Fanciest New Feature of the Week".
> > It breaks Jasper, so it's disabled by default.
> >
>
> Once we're satisfied that the new resources stuff works, I will vote for
> modifying Jasper to utilize it (via a JNDI InitialContext) so that it
won't
> matter whether or not you are running out of a WAR file.

As far as I know, Jasper breaks because of the compiler, which apparently
wants real files. Jasper itself can load the source of the pages from the
dir context just fine.
Perhaps I should just copy the /WEB-INF/classes/ directory and its contents
to the work directory ?

The directory context can be accessed by either :
- Doing (new InitialContext()).lookup("java:/comp/Resources") if naming is
enabled (it can be disabled)
- Getting them from the ServletContext :
getServletContext().getAttribute("org.apache.catalina.resources"). That can
be used as a backup to naming if it's disabled (it's also faster)
- With the standard Servlet API call, using
ServletContext.getResource(path).openConnection() and using the
URLConnection object (of course, you can't list the contents of a directory
using this)

Remy


Mime
View raw message