You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by rs...@apache.org on 2002/08/28 23:54:19 UTC
cvs commit: xml-axis/java/src/org/apache/axis/configuration EngineConfigurationFactoryServlet.java
rsitze 2002/08/28 14:54:19
Modified: java/src/org/apache/axis/configuration
EngineConfigurationFactoryServlet.java
Log:
EngineConfigurationFactoryServlet (indirectly) made *upto* three attempts to locate the /WEB-INF/<server_config_file>, using:
1. ServletContext.getResourceAsStream() [EngineConfigurationFactoryServlet]
2. FileInputStream() [FileProvider]
2. engine.class.getClassLoader().getResourceAsStream() [ClassUtils]
3. systemClassLoader.getResourceAsStream() [ClassUtils]
2. engine.class.getResourceAsStream() [ClassUtils]
For a Servlet, the ONLY one that makes sense is (1).
Revision Changes Path
1.3 +7 -14 xml-axis/java/src/org/apache/axis/configuration/EngineConfigurationFactoryServlet.java
Index: EngineConfigurationFactoryServlet.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/configuration/EngineConfigurationFactoryServlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EngineConfigurationFactoryServlet.java 28 Aug 2002 03:15:11 -0000 1.2
+++ EngineConfigurationFactoryServlet.java 28 Aug 2002 21:54:19 -0000 1.3
@@ -148,12 +148,13 @@
*/
String webInfPath = ctx.getRealPath("/WEB-INF");
- FileProvider config = null ;
+ FileProvider config = null ;
+
+ if (webInfPath == null || !(new File(webInfPath,
+ SERVER_CONFIG_FILE)).exists()){
+ InputStream is =
+ ctx.getResourceAsStream("/WEB-INF/"+ SERVER_CONFIG_FILE);
- if (webInfPath == null || !(new File(webInfPath,
- SERVER_CONFIG_FILE)).exists()){
- InputStream is = ctx.getResourceAsStream("/WEB-INF/"+
- SERVER_CONFIG_FILE);
if (is == null) {
log.error(JavaUtils.getMessage
("servletEngineWebInfError01",
@@ -162,15 +163,7 @@
config = new FileProvider(is);
}
}
- if ( config == null ) {
- try {
- config = new FileProvider(webInfPath,
- SERVER_CONFIG_FILE);
- } catch (ConfigurationException ex) {
- log.error(JavaUtils.getMessage
- ("servletEngineWebInfError00"), ex);
- }
- }
+
return config;
}
}
Re: cvs commit: xml-axis/java/src/org/apache/axis/configuration
EngineConfigurationFactoryServlet.java
Posted by Richard Sitze <rs...@us.ibm.com>.
I really can count... really.
*******************************************
Richard A. Sitze
IBM WebSphere WebServices Development
EngineConfigurationFactoryServlet (indirectly) made *upto* three attempts
to locate the /WEB-INF/<server_config_file>, using:
1. ServletContext.getResourceAsStream()
[EngineConfigurationFactoryServlet]
2. FileInputStream() [FileProvider]
2. engine.class.getClassLoader().getResourceAsStream() [ClassUtils]
3. systemClassLoader.getResourceAsStream() [ClassUtils]
2. engine.class.getResourceAsStream() [ClassUtils]
For a Servlet, the ONLY one that makes sense is (1).