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 "Bernhard Hoisl (JIRA)" <ji...@apache.org> on 2009/05/13 11:10:45 UTC

[jira] Commented: (AXIS2-1220) AxisServlet.initContextRoot assumes 1 level deep context

    [ https://issues.apache.org/jira/browse/AXIS2-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708837#action_12708837 ] 

Bernhard Hoisl commented on AXIS2-1220:
---------------------------------------

I have a problem with Axis2 1.4.1  which seems to fit into this still open bug. Deploying the .war on a Tomcat 6.0.18 servlet container works fine except you want the context path not to be in the root level of Tomcat. I mean deploying Axis2 on http://tomcat:8080/axis2 works while http://tomcat:8080/subdir/axis2 doesn't.

Setting the contextRoot in axis2.xml and the axis2.find.context init-param to false for AxisServlet in web.xml didin't solve this issue.

Any ideas?

> AxisServlet.initContextRoot assumes 1 level deep context
> --------------------------------------------------------
>
>                 Key: AXIS2-1220
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1220
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.1
>         Environment: all
>            Reporter: Bob Stevenson
>            Assignee: Deepal Jayasinghe
>
> initContextRoot only grabs the first part of the context.  My context is /shop/wsengine , but this routine sets the contextRoot to only /shop.
> Then getEPRsForService() seems to rely on this for building the endpoints, which are incorrect.
> if (contextRoot == null) {
>             String [] parts = JavaUtils.split(req.getContextPath(), '/');
>             if (parts != null) {
>                 for (int i = 0; i < parts.length; i++) {
>                     if (parts[i].length() > 0) {
>                         contextRoot = parts[i];                 
>                         break;
>                     }
>                 }
>             }
>             if (contextRoot == null || req.getContextPath().equals("/")) {
>                 contextRoot = "/";
>             }
>                         log.warn("contextRoot2: " + req.getContextPath());
>             //configContext.setContextRoot(contextRoot);
>             configContext.setContextRoot(req.getContextPath());
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.