You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by an...@axa.com.au on 2004/04/14 02:36:01 UTC

ServletTestRunner, fixed context path

We are using Cactus and its intergrated with existing web application, 
called as "eservice".
Now, due to security contraints controlled by SiteMinder people in our 
environment, all Cactus related redirectors and test runner is mapped to
"/eservice/test" and hence cactus.contextURL should be 
"cactus.contextURL=http://pc23165/eservice/test".

But the issue is ServletTestRunner doesn't set this system property using 
cactus.properties file in WEB-INF folder anymore rather it uses :

        System.setProperty(
                    BaseConfiguration.CACTUS_CONTEXT_URL_PROPERTY,
                    "http://" + theRequest.getServerName() + ":"
                    + theRequest.getServerPort()
                    + theRequest.getContextPath());

Because of this, ServletTestRunner doesnt work in our environment as it 
gets context path as "eservice" not "eservice/test". 

Is there any workaround to get over this problem?

Otherwise it can be raised as a bug and can be fixed in future release. 


*********************************************************************************
Important Note
This email (including any attachments) contains information which is 
confidential and may be subject to legal privilege.  If you are not 
the intended recipient you must not use, distribute or copy this 
email.  If you have received this email in error please notify the 
sender immediately and delete this email. Any views expressed in this 
email are not necessarily the views of AXA.   Thank you.
*********************************************************************************


RE: ServletTestRunner, fixed context path

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Ankur,

I have modified the ServletTestRunenr implementation so that it tries to
read the information from the cactus.properties file. If it doesn't find
such a file or if the context URL property is not defined in there, it
sets it with the default value you mention below.

I haven't tested the modifications yet. I'll upload a nightly build
tonight. Would you be able to test it and validate it works fine?

Thanks
-Vincent

> -----Original Message-----
> From: ankur.kumar@axa.com.au [mailto:ankur.kumar@axa.com.au]
> Sent: 14 April 2004 02:36
> To: Cactus Users List
> Cc: cactus-dev@jakarta.apache.org
> Subject: ServletTestRunner, fixed context path
> 
> We are using Cactus and its intergrated with existing web application,
> called as "eservice".
> Now, due to security contraints controlled by SiteMinder people in our
> environment, all Cactus related redirectors and test runner is mapped
to
> "/eservice/test" and hence cactus.contextURL should be
> "cactus.contextURL=http://pc23165/eservice/test".
> 
> But the issue is ServletTestRunner doesn't set this system property
using
> cactus.properties file in WEB-INF folder anymore rather it uses :
> 
>         System.setProperty(
>                     BaseConfiguration.CACTUS_CONTEXT_URL_PROPERTY,
>                     "http://" + theRequest.getServerName() + ":"
>                     + theRequest.getServerPort()
>                     + theRequest.getContextPath());
> 
> Because of this, ServletTestRunner doesnt work in our environment as
it
> gets context path as "eservice" not "eservice/test".
> 
> Is there any workaround to get over this problem?
> 
> Otherwise it can be raised as a bug and can be fixed in future
release.
> 
> 
>
************************************************************************
**
> *******
> Important Note
> This email (including any attachments) contains information which is
> confidential and may be subject to legal privilege.  If you are not
> the intended recipient you must not use, distribute or copy this
> email.  If you have received this email in error please notify the
> sender immediately and delete this email. Any views expressed in this
> email are not necessarily the views of AXA.   Thank you.
>
************************************************************************
**
> *******



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


RE: ServletTestRunner, fixed context path

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Ankur,

I have modified the ServletTestRunenr implementation so that it tries to
read the information from the cactus.properties file. If it doesn't find
such a file or if the context URL property is not defined in there, it
sets it with the default value you mention below.

I haven't tested the modifications yet. I'll upload a nightly build
tonight. Would you be able to test it and validate it works fine?

Thanks
-Vincent

> -----Original Message-----
> From: ankur.kumar@axa.com.au [mailto:ankur.kumar@axa.com.au]
> Sent: 14 April 2004 02:36
> To: Cactus Users List
> Cc: cactus-dev@jakarta.apache.org
> Subject: ServletTestRunner, fixed context path
> 
> We are using Cactus and its intergrated with existing web application,
> called as "eservice".
> Now, due to security contraints controlled by SiteMinder people in our
> environment, all Cactus related redirectors and test runner is mapped
to
> "/eservice/test" and hence cactus.contextURL should be
> "cactus.contextURL=http://pc23165/eservice/test".
> 
> But the issue is ServletTestRunner doesn't set this system property
using
> cactus.properties file in WEB-INF folder anymore rather it uses :
> 
>         System.setProperty(
>                     BaseConfiguration.CACTUS_CONTEXT_URL_PROPERTY,
>                     "http://" + theRequest.getServerName() + ":"
>                     + theRequest.getServerPort()
>                     + theRequest.getContextPath());
> 
> Because of this, ServletTestRunner doesnt work in our environment as
it
> gets context path as "eservice" not "eservice/test".
> 
> Is there any workaround to get over this problem?
> 
> Otherwise it can be raised as a bug and can be fixed in future
release.
> 
> 
>
************************************************************************
**
> *******
> Important Note
> This email (including any attachments) contains information which is
> confidential and may be subject to legal privilege.  If you are not
> the intended recipient you must not use, distribute or copy this
> email.  If you have received this email in error please notify the
> sender immediately and delete this email. Any views expressed in this
> email are not necessarily the views of AXA.   Thank you.
>
************************************************************************
**
> *******