A quick search of the servlet spec doesn't mention web.xml as being
configurable. In fact, page 70 suggests that the contents of 'WEB-INF/'
should include it. If you choose not to call it 'web.xml' and place it
in 'WEB-INF/' that's really your choice, but I wouldn't expect
portability. 

-Wes 

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Cheng
> Sent: Wednesday, October 18, 2006 1:22 PM
> To: user@struts.apache.org
> Subject: why hardcode the path of web.xml?
> 
> I am using version 1.3.5 and found out that that path of 
> web.xml is hard 
> coded at line 1723
> 
>         InputStream input = 
> getServletContext().getResourceAsStream("/WEB-INF/web.xml");
> 
> In resin, I use <config-file> to change the path of web.xml 
> for example 
> <config-file>myapp-web.xml</config-file>. As I start the 
> application, the 
> servlet crashes of course.
> In the mean time, I have added the following to ActionServlet 
> to get around:
> 
> String configWebXml = 
> getServletConfig().getInitParameter("configWebXml");
> 
>         if (input == null) {
>             input = 
> getServletContext().getResourceAsStream(configWebXml);
>         }
> 
> Could anybody fix this or everybody is already using Struts2?
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to