On Fri, 10 Jan 2003, Erik Price wrote:
> Date: Fri, 10 Jan 2003 12:16:46 -0500 > From: Erik Price <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: Tomcat Users List <[EMAIL PROTECTED]> > Subject: WAR future-compatibility > > I have learned, thanks to reading this list, that one cannot depend on > the presence of the filesystem when developing a webapp, if that webapp > is ever to be bundled as a WAR file. > > I would like to structure my webapp thusly: > > /webapp > | > jsp1.jsp > jsp2.jsp > jsp3.jsp > /includes <-- this is "/webapp/includes" > | > titlebar.jsp > navbar.jsp > footer.jsp > /WEB-INF > | > /classes > /lib > > If I do this: > > <%@ include file="includes/titlebar.jsp" %> > > Will my webapp still work if it's bundled as a WAR file? Or is this a > case of creating a dependency on the presence of the filesystem? > This will work fine. Containers that run webapps directly from a WAR know how to resolve relative URIs to other resources in the WAR. You can even try it for yourself if you want -- set the umpackWARs attribute in server.xml to false, and put a WAR file into the webapps directory. > > Thanks, > > Erik Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
