Author: luca
Date: Mon Feb 18 22:59:25 2013
New Revision: 1447531
URL: http://svn.apache.org/r1447531
Log:
Allowing web-grid servlet to be configured via external XML file (OODT-558)
Modified:
oodt/trunk/grid/src/main/java/org/apache/oodt/grid/GridServlet.java
Modified: oodt/trunk/grid/src/main/java/org/apache/oodt/grid/GridServlet.java
URL:
http://svn.apache.org/viewvc/oodt/trunk/grid/src/main/java/org/apache/oodt/grid/GridServlet.java?rev=1447531&r1=1447530&r2=1447531&view=diff
==============================================================================
--- oodt/trunk/grid/src/main/java/org/apache/oodt/grid/GridServlet.java
(original)
+++ oodt/trunk/grid/src/main/java/org/apache/oodt/grid/GridServlet.java Mon Feb
18 22:59:25 2013
@@ -52,7 +52,8 @@ public abstract class GridServlet extend
*/
protected Configuration getConfiguration() throws ServletException,
IOException {
if (configuration != null) return configuration;
- String path =
getServletContext().getRealPath("/WEB-INF/config.xml");
+ String path =
getServletContext().getInitParameter("org.apache.oodt.grid.GridServlet.config");
+ if (path == null) path =
getServletContext().getRealPath("/WEB-INF/config.xml");
if (path == null)
throw new ServletException("The config.xml file can't
be accessed. Are we running from a war file!??!");
File file = new File(path);