You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Crishantha Nanayakkara <c....@gmail.com> on 2009/05/12 14:31:59 UTC

Invoking an external URL

Hi All,

How can I invoke an external URL (absolute path) using the struts framework?
I can see tags within <result> tag in struts.xml to invoke a relative URL
within the application. But I am unable to find a way to call an external
URL passing certain parameters.

For example, in normal JSPs, we can specify my requirement as follows.

<form action="https://pay.bix.lk/servlet/payServletXX" method="post">

How can I incorporate this in Struts framework? especially in struts.xml?

Thank you very much.

Best Regards
Crishantha
-- 
View this message in context: http://www.nabble.com/Invoking-an-external-URL-tp23501665p23501665.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Invoking an external URL

Posted by Crishantha Nanayakkara <c....@gmail.com>.
Sorry the code snippet should be as follows. There was a formatting error in
my previous post.

                <action name="testUrl" class="TestAction">
                       <result name="success" type="redirect">
                             https://pay.bix.lk/servlet/payServletXX 
                            false
                       </result>
                </action>


Crishantha Nanayakkara wrote:
> 
> Suneel, Does this mean that, can I use something similar to the following?
> 
>                 <action name="testUrl" class="TestAction">
>                        <result name="success" type="redirect">
>                             https://pay.bix.lk/servlet/payServletXX
>                             false
>                        </result>
>                 </action>
> 
> Here as you can see the external URL is
> https://pay.bix.lk/servlet/payServletXX which is a servlet. When I apply
> above it does not work properly. Am I missing something here. BTW, I am
> running this within a Liferay portlet.
> 
> 
> 
> Suneel Gundlapalli wrote:
>> 
>> You can use the 'Redirect Result'. Check here:
>> http://struts.apache.org/2.1.6/docs/result-types.html
>> 
>> On Tue, May 12, 2009 at 7:31 AM, Crishantha Nanayakkara
>> <c....@gmail.com> wrote:
>>>
>>> Hi All,
>>>
>>> How can I invoke an external URL (absolute path) using the struts
>>> framework?
>>> I can see tags within <result> tag in struts.xml to invoke a relative
>>> URL
>>> within the application. But I am unable to find a way to call an
>>> external
>>> URL passing certain parameters.
>>>
>>> For example, in normal JSPs, we can specify my requirement as follows.
>>>
>>> <form action="https://pay.bix.lk/servlet/payServletXX" method="post">
>>>
>>> How can I incorporate this in Struts framework? especially in
>>> struts.xml?
>>>
>>> Thank you very much.
>>>
>>> Best Regards
>>> Crishantha
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Invoking-an-external-URL-tp23501665p23501665.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>> 
>> 
>> 
>> -- 
>> Thanks
>> Suneel
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Invoking-an-external-URL-tp23501665p23515044.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Invoking an external URL

Posted by Crishantha Nanayakkara <c....@gmail.com>.
Suneel, Does this mean that, can I use something similar to the following?

                <action name="testUrl" class="TestAction">
                       <result name="success" type="redirect">
                            https://pay.bix.lk/servlet/payServletXX
                            false
                       </result>
                </action>

Here as you can see the external URL is
https://pay.bix.lk/servlet/payServletXX which is a servlet. When I apply
above it does not work properly. Am I missing something here. BTW, I am
running this within a Liferay portlet.



Suneel Gundlapalli wrote:
> 
> You can use the 'Redirect Result'. Check here:
> http://struts.apache.org/2.1.6/docs/result-types.html
> 
> On Tue, May 12, 2009 at 7:31 AM, Crishantha Nanayakkara
> <c....@gmail.com> wrote:
>>
>> Hi All,
>>
>> How can I invoke an external URL (absolute path) using the struts
>> framework?
>> I can see tags within <result> tag in struts.xml to invoke a relative URL
>> within the application. But I am unable to find a way to call an external
>> URL passing certain parameters.
>>
>> For example, in normal JSPs, we can specify my requirement as follows.
>>
>> <form action="https://pay.bix.lk/servlet/payServletXX" method="post">
>>
>> How can I incorporate this in Struts framework? especially in struts.xml?
>>
>> Thank you very much.
>>
>> Best Regards
>> Crishantha
>> --
>> View this message in context:
>> http://www.nabble.com/Invoking-an-external-URL-tp23501665p23501665.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> 
> -- 
> Thanks
> Suneel
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Invoking-an-external-URL-tp23501665p23515021.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Invoking an external URL

Posted by Suneel <su...@gmail.com>.
You can use the 'Redirect Result'. Check here:
http://struts.apache.org/2.1.6/docs/result-types.html

On Tue, May 12, 2009 at 7:31 AM, Crishantha Nanayakkara
<c....@gmail.com> wrote:
>
> Hi All,
>
> How can I invoke an external URL (absolute path) using the struts framework?
> I can see tags within <result> tag in struts.xml to invoke a relative URL
> within the application. But I am unable to find a way to call an external
> URL passing certain parameters.
>
> For example, in normal JSPs, we can specify my requirement as follows.
>
> <form action="https://pay.bix.lk/servlet/payServletXX" method="post">
>
> How can I incorporate this in Struts framework? especially in struts.xml?
>
> Thank you very much.
>
> Best Regards
> Crishantha
> --
> View this message in context: http://www.nabble.com/Invoking-an-external-URL-tp23501665p23501665.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Thanks
Suneel

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org