I don't think this is a question of forwarding between webapps. I thought
this was being done using a Tomcat Valve. If so, the forwarding is done by
this valve, which sits outside all webapps.

On Wed, Feb 15, 2012 at 10:15 AM, Reka Thirunavukkarasu <r...@wso2.com>wrote:

> Hi
>
> Since we work with two WebApp one is the main WebApp in AS and the other
> is the deployed WebApp in AS, it requires to forward the URL across WebApps
> according to offline discussion with Sameera.
>
> Are these two WebApp staying in the same Tomcat container? According to
> [1], to forward within different WebApp, they need to live in the same
> Tomcat container.
>
> [1]
> http://www.coderanch.com/t/512848/Servlets/java/Calling-another-web-app-RequestDispatcher
>
>
> On Thu, Feb 9, 2012 at 5:51 PM, Reka Thirunavukkarasu <r...@wso2.com>wrote:
>
>> Hi
>>
>> I'm working on custom context mapping for web-apps in Stratos application
>> server. In order to handle it, i want to redirect the user given url to the
>> actual (current) url without user knowing the redirection. So
>> RequestDispatcher is the possible one that i could use here. But when i
>> used RequestDispatcher, it is looping several times and finally ends up
>> with the login page.
>>
>> I found CarbonSecuredHttpContext in org.wso2.carbon.ui is doing some
>> redirection for every secured request where after several looping only, one
>> url is redirected in the browser. When i send the requested URL without any
>> context (https://test.stratosapps.com:9446/), it is redirecting to
>> "response.sendRedirect("carbon")" in CarbonSecuredHttpContext . So that
>> login page finally ends up. When i login as a super tenant, i accessed
>> http://example.stratosapps.com:9763 through http, same issue happens
>> there as well.
>>
>> Can somebody suggest me how could i possibly do a redirection here for a
>> url like https://example.stratosapps.com:9446/ to redirect
>> https://example.stratosapps.com:9446/t/testdev.com/webapps/example in
>> case "example" is the web-app?
>>
>> FYI=>I have done the domain mapping in /etc/hosts.
>> The relervant code is:
>>
>> RequestDispatcher requestDispatcher = request.getRequestDispatcher("/t/
>> testdev.com/webapps/example");
>> requestDispatcher.forward(request,response);
>>
>>
>> Regards,
>> Reka
>>
>
>


-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* <http://www.apache.org/>**
email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919
blog: **http://blog.afkham.org* <http://blog.afkham.org>*
twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to