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 "Bob Stevenson (JIRA)" <ji...@apache.org> on 2006/09/22 23:09:22 UTC

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

AxisServlet.initContextRoot assumes 1 level deep context
--------------------------------------------------------

                 Key: AXIS2-1220
                 URL: http://issues.apache.org/jira/browse/AXIS2-1220
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: core
    Affects Versions: 1.1
         Environment: all
            Reporter: Bob Stevenson


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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Bob Stevenson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1220?page=comments#action_12442242 ] 
            
Bob Stevenson commented on AXIS2-1220:
--------------------------------------


   [[ Old comment, sent by email on Mon, 2 Oct 2006 08:05:03 -0500 ]]

Yes that is correct.  It is not working like it should.  In your example
the code only takes /shop as the contextpath.



> AxisServlet.initContextRoot assumes 1 level deep context
> --------------------------------------------------------
>
>                 Key: AXIS2-1220
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1220
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.1
>         Environment: all
>            Reporter: Bob Stevenson
>         Assigned To: Eran Chinthaka
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Jeff Peterson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479449 ] 

Jeff Peterson commented on AXIS2-1220:
--------------------------------------

I found a work-around for the problem:
 * Manually set contextRoot in axis2.xml
 * Set the "axis2.find.context" init-param to "false"  for AxisServlet in web.xml

The initContextRoot() is definitely problematic and should be fixed.  In lieu of that, the above works.

> 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
>         Assigned To: Eran Chinthaka
>
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Olof Jönsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545880 ] 

Olof Jönsson commented on AXIS2-1220:
-------------------------------------

I've embedded axis2 into OSGi and I'm using the HTTP service. Unfortunately, I get the same problem here where the endpoint references lack the actual path to the servlet. I get http://localhost:8080/service/... directly in the WSDL instead of http://localhost:8080/axis2/service when the servlet is deployed on "/axis2". Isn't the problem here that getServletPath() isn't used? I changed the following lines of initContextRoot():

        String contextPath = req.getContextPath();
        //handling ROOT scenario, for servlets in the default (root) context, this method returns ""
        if (contextPath != null && contextPath.length() == 0) {
            contextPath = "/";
        }
        this.contextRoot = contextPath;

into this single line:

        this.contextRoot =  req.getContextPath() + req.getServletPath();

which corrected the problem for me.



> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1220?page=comments#action_12439099 ] 
            
Eran Chinthaka commented on AXIS2-1220:
---------------------------------------

Hi Bob,

We divide the the whole context in to two. Context path and service root. 

if the url is something like http://myhost/shop/myEngine/services, then 

context path = /shop/myEngine and 
service path - services.

Are you saying the above is not working or you expect context path to be equal to /shop/myEngine/services?

> AxisServlet.initContextRoot assumes 1 level deep context
> --------------------------------------------------------
>
>                 Key: AXIS2-1220
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1220
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.1
>         Environment: all
>            Reporter: Bob Stevenson
>         Assigned To: Eran Chinthaka
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Bernhard Hoisl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708837#action_12708837 ] 

Bernhard Hoisl edited comment on AXIS2-1220 at 5/13/09 6:39 AM:
----------------------------------------------------------------

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 didn't solve this issue.

Any ideas?

      was (Author: hoisl):
    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.


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1220?page=all ]

Davanum Srinivas resolved AXIS2-1220.
-------------------------------------

    Resolution: Fixed

The solution involved setting it in the axis2.xml file.

thanks,
dims

> AxisServlet.initContextRoot assumes 1 level deep context
> --------------------------------------------------------
>
>                 Key: AXIS2-1220
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1220
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.1
>         Environment: all
>            Reporter: Bob Stevenson
>         Assigned To: Eran Chinthaka
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Jeff Peterson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479428 ] 

Jeff Peterson commented on AXIS2-1220:
--------------------------------------

I think this issue needs to be reopened.  With the default configuration for Axis2 1.1.1 the problem still happens.

The culprit appears to be AxisServlet.initContextRoot().   By default it ignores the axis2.xml configuration options and attempts to find the context on its own.

> 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
>         Assigned To: Eran Chinthaka
>
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1220?page=all ]

Davanum Srinivas reassigned AXIS2-1220:
---------------------------------------

    Assignee: Eran Chinthaka

> AxisServlet.initContextRoot assumes 1 level deep context
> --------------------------------------------------------
>
>                 Key: AXIS2-1220
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1220
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.1
>         Environment: all
>            Reporter: Bob Stevenson
>         Assigned To: Eran Chinthaka
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Eran Chinthaka (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1220?page=comments#action_12442531 ] 
            
Eran Chinthaka commented on AXIS2-1220:
---------------------------------------

Hi Bob, 

I just checked in (r464440) the fix for this which should be available in nightly builds within couple of hours. Please check this issue again and let us know if the problem still exists or not.

Thanks,
Chinthaka

> AxisServlet.initContextRoot assumes 1 level deep context
> --------------------------------------------------------
>
>                 Key: AXIS2-1220
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1220
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.1
>         Environment: all
>            Reporter: Bob Stevenson
>         Assigned To: Eran Chinthaka
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Chad DeBauch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505816 ] 

Chad DeBauch commented on AXIS2-1220:
-------------------------------------

To get context roots that are 2 levels deep such as this "ws/test" to work correctly in Axis2 you must change two parameters in the axis2.xml config file. They are to look as follows for a context root like the following "ws/test".

<parameter name="contextRoot">ws/test</parameter>
<parameter name="servicePath">test/services</parameter>

The client will be able to hit services with these setting as well as be able to view the wsdl by appending "?wsdl" at the end of the endpoint. There is a bug in Axis2 administration pages that will not render this information correctly.  Since I don't use the administration pages this work around works, but should be fixed in a later release.

I am using Axis2 on WAS 6.1 Server.

> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Bernhard Hoisl (JIRA)" <ji...@apache.org>.
    [ 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.


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

Posted by "Bob Stevenson (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1220?page=comments#action_12441874 ] 
            
Bob Stevenson commented on AXIS2-1220:
--------------------------------------

Axis2 thinks my context path is /shop, and NOT /shop/myEngine as it should.  The code appears to only take the context path up to the first /

The service path is correct.

> AxisServlet.initContextRoot assumes 1 level deep context
> --------------------------------------------------------
>
>                 Key: AXIS2-1220
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1220
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.1
>         Environment: all
>            Reporter: Bob Stevenson
>         Assigned To: Eran Chinthaka
>
> 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas reopened AXIS2-1220:
-------------------------------------


Reopened as per last comment.

> 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
>         Assigned To: Eran Chinthaka
>
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


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

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-1220:
------------------------------------

    Assignee: Deepal Jayasinghe  (was: Eran Chinthaka)

> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org