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 di...@apache.org on 2008/03/10 15:50:29 UTC
svn commit: r635570 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
Author: dims
Date: Mon Mar 10 07:50:26 2008
New Revision: 635570
URL: http://svn.apache.org/viewvc?rev=635570&view=rev
Log:
Fix for AXIS2-3098 - WebService deployment failed due to config.getServletContext().getRealPath("") returns null in NES6.2
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java?rev=635570&r1=635569&r2=635570&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/WarBasedAxisConfigurator.java Mon Mar 10 07:50:26 2008
@@ -100,6 +100,9 @@
// we can set the web location path in the deployment engine.
// This will let us
String webpath = config.getServletContext().getRealPath("");
+ if (webpath == null || webpath.length() == 0) {
+ webpath = config.getServletContext().getRealPath("/");
+ }
if (webpath != null && !"".equals(webpath)) {
log.debug("setting web location string: " + webpath);
File weblocation = new File(webpath);
@@ -215,6 +218,12 @@
// this is an unpacked war file
repository = config.getServletContext().getRealPath("/WEB-INF");
}
+ if (repository == null) {
+ if (config.getServletContext().getRealPath("/") != null) {
+ // this is an unpacked war file
+ repository = config.getServletContext().getRealPath("/WEB-INF");
+ }
+ }
if (repository != null) {
loadRepository(repository);
log.debug("loaded repository from /WEB-INF folder (unpacked war)");
@@ -269,7 +278,8 @@
return;
}
loadServicesFromWebInf();
- if (config.getServletContext().getRealPath("") != null) {
+ if (config.getServletContext().getRealPath("") != null ||
+ config.getServletContext().getRealPath("/") != null) {
super.loadServices();
log.debug("loaded services from webapp");
return;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org