Is that a valid call? servletcontext.getRealPath("WEB-INF") be careful
here not to open a security violation.
servlet spec says this.
A special directory exists within the application hierarchy named
“WEB-INF”.
This directory contains all things related to the application that
aren’t in the
document root of the application. The WEB-INF node is not part of the public
document tree of the application. No file contained in the WEB-INF
directory may
be served directly to a client by the container. However, the contents
of the WEB-
INF directory are visible to servlet code using the getResource and
getResource-
AsStream method calls on the ServletContext, and may be exposed using the
RequestDispatcher calls. Hence, if the Application Developer needs
access, from
servlet code, to application specific configuration information that he
does not
wish to be exposed directly to the Web client, he may place it under
this directory.
Since requests are matched to resource mappings in a case-sensitive manner,
client requests for ‘/WEB-INF/foo’, ‘/WEb-iNf/foo’, for example, should
not result
in contents of the Web application located under /WEB-INF being
returned, nor
any form of directory listing thereof.
[EMAIL PROTECTED] wrote:
Dims,
I haven't tried the latest nightly. I'll give it a shot.
Thanks,
Junaid
"Davanum
Srinivas"
<[EMAIL PROTECTED] To
m> axis-user@ws.apache.org
cc
06/14/2006 11:43
AM Subject
Re: Axis2 Deployment Model
Deficiency
Please respond to
[EMAIL PROTECTED]
he.org
Junaid,
Did you try latest nightly? I believe this is fixed.
thanks,
dims
On 6/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,
Here's my scenario which I believe might be a common requirement for a
lot
of enterprise applications. I'm trying to bundle Axis2 webapp as part of
a
bigger EAR application and deploy in an application server such as
WebLogic. I would like to package up all of the Web Services inside of
the
webapp/EAR file. The problem is that Axis2 cannot seem to load the
services
from within the EAR file in WebLogic..
The issue arises due to the fact that Axis2 relies on the concept of a
repository, which MUST be a folder on the file system. On certain
application servers like WebSphere, this is not an issue since they
internally explode the EAR when you deploy it and Axis2 does not seem to
have a problem. However application servers like WebLogic do NOT explode
the EAR, hence Axis2 cannot find/load the services from the repository.
Here is the offending code in WarBasedAxisConfigurator:
repository =
config.getServletContext().getRealPath("/WEB-INF"); <--- this returns
null
in Weblogic
axis2Steram = new FileInputStream(repository +
"/conf/axis2.xml");
There are 2 work-arounds as I understand it:
1) Always deploy the application in an exploded format (WebLogic provides
this feature). However this is not an option for us.
2) Use a repository folder OUTSIDE of the EAR by specifiying the
axis2.xml.path in web.xml. However this option also poses a problem in a
cluster scenario where you need to have a common accessible folder, which
will serve as the repository and EVERY machine in the cluster must be
mapped to this common folder. It's a setup & maintenance headache.
I worked previously with Axis 1.x and it did not have a problem loading
services from within the EAR file. Ofcourse any changes you make to the
configuration while it was running would be lost on a server re-start
(since server-config.wsdd was read-only). But it still worked.
I believe this is a critical change that is needed and should be
addressed
in the next version, unless I'm missing something here. Let me know if I
should open up an enhancement request JIRA.
Thanks,
Junaid
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Davanum Srinivas : http://wso2.com/blogs/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]