Re: JPublish WAR with JBoss 3.x-Tomcat 4.x
Mike Hogarth <[email protected]> Sun, 2 Mar 2003 20:28:33 -0800
| Newsgroups | gmane.comp.java.jpublish.devel |
|---|---|
| Message-ID | <[email protected]> |
Would be a nice way to go.
..to read files in the WAR file, you can use
getServletContext().getResourceAsStream("/directory/filename").
Mike H
On Sunday, March 2, 2003, at 07:29 PM, Dan Hodnett wrote:
> any plans to support deployment of JPublish WARs to JBoss 3.x-Tomcat
> 4.x
> environments? (I believe this is an issue with Weblogic 6.x, 7.x also)
>
> The issue is, of course, that WARs are not unpacked when the server is
> launched,
> and thereforethe JPublishServlet fails to initialize because it cannot
> read from config files under WEB-INF with the current implementation;
>
> String rootDir = getServletContext().getRealPath("/"); // returns null
> File contextRoot = new File(rootDir); // fails with NPE
>
> Dan Hodnett
>
>