> From: Brian Munroe [mailto:[EMAIL PROTECTED] > Subject: Re: Embedding XML documents as children of the > context-param element > > ServletContext sc = getServletConfig().getServletContext(); > String myXMLFIlePath = sc.getRealPath("/WEB-INF/myXMLFIle.xml");
The ServletContext.getRealPath() call will fail if the webapp is in an unexpanded .war or running on a platform without a normal file system (e.g., a mobile phone). Better to use ServletContext.getResourceAsStream(), which will function properly in all cases. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]