You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ts...@nildram.co.uk on 2002/08/16 12:36:30 UTC
Files in WEB-INF
I'd like to open a file in WEB-INF from my code. Is there a platform independent way of getting the path to WEB-INF? We have to deploy on Tomcat and Websphere 4.
ta,
Tim.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Files in WEB-INF
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 16 Aug 2002 tsawyer@nildram.co.uk wrote:
> Date: Fri, 16 Aug 2002 10:36:30 BST
> From: tsawyer@nildram.co.uk
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>,
> tsawyer@nildram.co.uk
> To: struts-user@jakarta.apache.org
> Cc: tsawyer@nildram.co.uk
> Subject: Files in WEB-INF
>
> I'd like to open a file in WEB-INF from my code. Is there a platform
> independent way of getting the path to WEB-INF? We have to deploy on
> Tomcat and Websphere 4.
>
You can do what Struts does to read the configuration file:
InputStream stream =
getServletContext().getResourceAsStream("/WEB-INF/struts-config.xml");
> ta,
>
> Tim.
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>