axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Rapp" <Dan.R...@whizbang.com>
Subject Suggested change to AxisServlet
Date Mon, 07 Jan 2002 23:05:41 GMT
I'm using Axis in an environment where we sometimes use Jetty instead of
Apache Tomcat. Jetty supports execution of web applications directly out
of the Web Application Archive rather than extracting the app to a
directory. I've encountered a minor problem with Axis in this
environment that has a simple work around.
 
Following is that patch that will allow configuration load in this
environment.
 
--Dan Rapp
 
Index: java/src/org/apache/axis/transport/http/AxisServlet.java
===================================================================
RCS file:
/home/cvspublic/xml-axis/java/src/org/apache/axis/transport/http/AxisSer
vlet.java,v
retrieving revision 1.70
diff -u -r1.70 AxisServlet.java
--- java/src/org/apache/axis/transport/http/AxisServlet.java    12 Dec
2001 18:17:52 -0000      1.70
+++ java/src/org/apache/axis/transport/http/AxisServlet.java    7 Jan
2002 22:55:19 -0000
@@ -135,12 +135,12 @@
 
     public AxisServer getEngine() throws AxisFault {
         if (getServletContext().getAttribute("AxisEngine") == null) {
-            String webInfPath =
getServletContext().getRealPath("/WEB-INF");
             // Set the base path for the AxisServer to our WEB-INF
directory
             // (so the config files can't get snooped by a browser)
             FileProvider provider =
-                    new FileProvider(webInfPath,
-                                     Constants.SERVER_CONFIG_FILE);
+                    new
FileProvider(getServletContext().getResourceAsStream(
+                                     "/WEB-INF/"+
+                                     Constants.SERVER_CONFIG_FILE));
 
             Map environment = new HashMap();
             environment.put("servletContext", getServletContext());

Mime
View raw message