axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giles Paterson" <>
Subject RC1 Bug (Was: RE: RC1 Deployment problem, possible bug?)
Date Thu, 26 Sep 2002 16:34:42 GMT

> -----Original Message-----
> From: Giles Paterson
> Sent: 26 September 2002 10:07
> To:
> Subject: FW: RC1 Deployment problem, possible bug?
> When stepping through the code, it looks as though axis can't find the
> server-config.wsdd file (which resides within the WAR file's WEB-INF
> directory).
> Further investigation reveals that the following line in AxisServletBase:
> String webInfPath = context.getRealPath("/WEB-INF");
> is returning null.
> Am I just missing some configuration parameters or is this, as I suspect,
> a bug similar to 10512 where getRealPath() can't be used within a war or
> ear file.

I've done some further investigation and have found a fix to the problem. Unfortunately it
has required a number of small changes to the axis code.

Basically this problem is related to the use of getRealPath() in various classes.

According to the javax.servlet.ServletContext (

"This method returns null  if the servlet container cannot translate the virtual path to a
real path for any reason (such as when the content is being made available from a .war archive)."

To work around this problem, I have taken the fix suggested in Bug 10512 and applied it to
all instances of getRealPath in the axis code. After each use of getRealPath I have checked
to see if the result was null and if it was, I called getResource() instead.

The classes I modified were:


Whilst this fix works, I'm not sure if it is an optimal solution as I haven't fully delved
into the intricacies of the axis source (what with pressing deadlines and all ;-) 

Does anyone have any comments or suggestions to make about this? Should I post a message to
the axis-dev list, and does anyone know if this is a known bug or not (I haven't found anything
apart from 10512 in bugzilla that relates to this)?

In my view the reason that this problem is often overlooked, is that some application servers,
such as tomcat implement getRealPath in such a way that it works within war files, however
app servers such as Weblogic don't. Although I can't find the URL at the moment, I remember
reading in the servlet spec that app servers aren't required to expand WAR files on execution
and hence aren't required to return values to getRealPath.


Giles Paterson

View raw message