You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Shah Amit <am...@hotmail.com> on 2005/04/01 16:48:04 UTC

Struts Bridge - ActionRequest Related Question

Hi all,

Please pardon my stupidity with the Struts bridge. I have read the 
documentation several times, and I understand what it says. However I have a 
little bit trouble visualizing it in my scenerio.

I have a page with 3 dropdowns. Each dropdown has an onChange="submit" thing 
and the secod dropdown is loaded based on value of first, third is loaded 
based on second. And then there is a table on the page that is loaded based 
on the selection of third dropdown.

I am using DispatchAction so that I have only one Action Class per page. Now 
this is an all display only page and actually the "state" is not being 
changed at all I think. In this case, for each form submission from the 
dropdowns, I am directly using render Actions and I dont have any forwards 
with redirects="true". Due to this I am getting a Warning from struts-bridge 
that -- "Using the original action URL for render URL:  A redirect should 
have been issued". So in such scenerios, should I have a dummy action which 
does nothing and has a forward with redirect="true" to my render action ??

I am sorry to ask this long question, but it is a little bit confusing to me 
.. :-(

Thanks,
Amit



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


Re: Struts Bridge - ActionRequest Related Question

Posted by Shah Amit <am...@hotmail.com>.
Thanks a lot !! That definately answers my question. I actually didn't even 
know about window.top.location :-( Sorry for my stupid questions.

Thanks,
Amit

----Original Message Follows----
From: Ate Douma <at...@douma.nu>
Reply-To: "Jetspeed Users List" <je...@jakarta.apache.org>
To: Jetspeed Users List <je...@jakarta.apache.org>
Subject: Re: Struts Bridge - ActionRequest Related Question
Date: Fri, 01 Apr 2005 17:14:38 +0200



Shah Amit wrote:
>Hi Ate,
>
>Thanks a lot for the quick reply.
>
>I am "submitting" a form with <html:form method="post" 
>action="/showPage.do"> and here is the action mapping
>
>        <action path="/showPage"
>            type="com.company.struts.actions.ViewerActions"
>            name="viewerForm" scope="request" validate="false" 
>parameter="dispatch">
>            <forward name="success" 
>path="/WEB-INF/view/rule5/rule5viewer.jsp"/>
>        </action>
>
>So probably my question would be is it possible to submit a form to a 
>render URL at all ... I guess No ?? ... So in that case, I will have to use 
>a dummy action with redirect="true" ?? ..
You should not "POST" a form to a render URL.
Encode your parameter(s) in a renderURL (for example using the Struts Bridge 
RewriteTag)
and just point your browser url to it (setting window.top.location).
>
>
>Thanks,
>Amit
>
>----Original Message Follows----
>From: Ate Douma <at...@douma.nu>
>Reply-To: "Jetspeed Users List" <je...@jakarta.apache.org>
>To: Jetspeed Users List <je...@jakarta.apache.org>
>Subject: Re: Struts Bridge - ActionRequest Related Question
>Date: Fri, 01 Apr 2005 16:56:58 +0200
>
>You *must* be using action URLs because this warning is *only* displayed
>from within processAction handling. Just make sure to use render URLs.
>
>
>Shah Amit wrote:
>
>>Hi all,
>>
>>Please pardon my stupidity with the Struts bridge. I have read the 
>>documentation several times, and I understand what it says. However I have 
>>a little bit trouble visualizing it in my scenerio.
>>
>>I have a page with 3 dropdowns. Each dropdown has an onChange="submit" 
>>thing and the secod dropdown is loaded based on value of first, third is 
>>loaded based on second. And then there is a table on the page that is 
>>loaded based on the selection of third dropdown.
>>
>>I am using DispatchAction so that I have only one Action Class per page. 
>>Now this is an all display only page and actually the "state" is not being 
>>changed at all I think. In this case, for each form submission from the 
>>dropdowns, I am directly using render Actions and I dont have any forwards 
>>with redirects="true". Due to this I am getting a Warning from 
>>struts-bridge that -- "Using the original action URL for render URL:  A 
>>redirect should have been issued". So in such scenerios, should I have a 
>>dummy action which does nothing and has a forward with redirect="true" to 
>>my render action ??
>>
>>I am sorry to ask this long question, but it is a little bit confusing to 
>>me .. :-(
>>
>>Thanks,
>>Amit
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
>


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



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


Re: Struts Bridge - ActionRequest Related Question

Posted by Ate Douma <at...@douma.nu>.

Shah Amit wrote:
> Hi Ate,
> 
> Thanks a lot for the quick reply.
> 
> I am "submitting" a form with <html:form method="post" 
> action="/showPage.do"> and here is the action mapping
> 
>        <action path="/showPage"
>            type="com.company.struts.actions.ViewerActions"
>            name="viewerForm" scope="request" validate="false" 
> parameter="dispatch">
>            <forward name="success" 
> path="/WEB-INF/view/rule5/rule5viewer.jsp"/>
>        </action>
> 
> So probably my question would be is it possible to submit a form to a 
> render URL at all ... I guess No ?? ... So in that case, I will have to 
> use a dummy action with redirect="true" ?? ..
You should not "POST" a form to a render URL.
Encode your parameter(s) in a renderURL (for example using the Struts Bridge RewriteTag)
and just point your browser url to it (setting window.top.location).
> 
> 
> Thanks,
> Amit
> 
> ----Original Message Follows----
> From: Ate Douma <at...@douma.nu>
> Reply-To: "Jetspeed Users List" <je...@jakarta.apache.org>
> To: Jetspeed Users List <je...@jakarta.apache.org>
> Subject: Re: Struts Bridge - ActionRequest Related Question
> Date: Fri, 01 Apr 2005 16:56:58 +0200
> 
> You *must* be using action URLs because this warning is *only* displayed
> from within processAction handling. Just make sure to use render URLs.
> 
> 
> Shah Amit wrote:
> 
>> Hi all,
>>
>> Please pardon my stupidity with the Struts bridge. I have read the 
>> documentation several times, and I understand what it says. However I 
>> have a little bit trouble visualizing it in my scenerio.
>>
>> I have a page with 3 dropdowns. Each dropdown has an onChange="submit" 
>> thing and the secod dropdown is loaded based on value of first, third 
>> is loaded based on second. And then there is a table on the page that 
>> is loaded based on the selection of third dropdown.
>>
>> I am using DispatchAction so that I have only one Action Class per 
>> page. Now this is an all display only page and actually the "state" is 
>> not being changed at all I think. In this case, for each form 
>> submission from the dropdowns, I am directly using render Actions and 
>> I dont have any forwards with redirects="true". Due to this I am 
>> getting a Warning from struts-bridge that -- "Using the original 
>> action URL for render URL:  A redirect should have been issued". So in 
>> such scenerios, should I have a dummy action which does nothing and 
>> has a forward with redirect="true" to my render action ??
>>
>> I am sorry to ask this long question, but it is a little bit confusing 
>> to me .. :-(
>>
>> Thanks,
>> Amit
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 
> 
> 
> 


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


Re: Struts Bridge - ActionRequest Related Question

Posted by Shah Amit <am...@hotmail.com>.
Hi Ate,

I think I found my answer from the struts-bridge documentation ---

"Forms must *always* use a POST to an ActionURL, but for all generated links 
it will have to be determined which type of url actually is required." So I 
guess I will have to use a dummy action that does nothing and then redirect 
to render action.

Thanks for your help

Amit

----Original Message Follows----
From: "Shah Amit" <am...@hotmail.com>
Reply-To: "Jetspeed Users List" <je...@jakarta.apache.org>
To: jetspeed-user@jakarta.apache.org
Subject: Re: Struts Bridge - ActionRequest Related Question
Date: Fri, 01 Apr 2005 10:05:31 -0500

Hi Ate,

Thanks a lot for the quick reply.

I am "submitting" a form with <html:form method="post" 
action="/showPage.do"> and here is the action mapping

        <action path="/showPage"
            type="com.company.struts.actions.ViewerActions"
            name="viewerForm" scope="request" validate="false" 
parameter="dispatch">
            <forward name="success" 
path="/WEB-INF/view/rule5/rule5viewer.jsp"/>
        </action>

So probably my question would be is it possible to submit a form to a render 
URL at all ... I guess No ?? ... So in that case, I will have to use a dummy 
action with redirect="true" ?? ..


Thanks,
Amit

----Original Message Follows----
From: Ate Douma <at...@douma.nu>
Reply-To: "Jetspeed Users List" <je...@jakarta.apache.org>
To: Jetspeed Users List <je...@jakarta.apache.org>
Subject: Re: Struts Bridge - ActionRequest Related Question
Date: Fri, 01 Apr 2005 16:56:58 +0200

You *must* be using action URLs because this warning is *only* displayed
from within processAction handling. Just make sure to use render URLs.


Shah Amit wrote:
>Hi all,
>
>Please pardon my stupidity with the Struts bridge. I have read the 
>documentation several times, and I understand what it says. However I have 
>a little bit trouble visualizing it in my scenerio.
>
>I have a page with 3 dropdowns. Each dropdown has an onChange="submit" 
>thing and the secod dropdown is loaded based on value of first, third is 
>loaded based on second. And then there is a table on the page that is 
>loaded based on the selection of third dropdown.
>
>I am using DispatchAction so that I have only one Action Class per page. 
>Now this is an all display only page and actually the "state" is not being 
>changed at all I think. In this case, for each form submission from the 
>dropdowns, I am directly using render Actions and I dont have any forwards 
>with redirects="true". Due to this I am getting a Warning from 
>struts-bridge that -- "Using the original action URL for render URL:  A 
>redirect should have been issued". So in such scenerios, should I have a 
>dummy action which does nothing and has a forward with redirect="true" to 
>my render action ??
>
>I am sorry to ask this long question, but it is a little bit confusing to 
>me .. :-(
>
>Thanks,
>Amit
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
>


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



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



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


Re: Struts Bridge - ActionRequest Related Question

Posted by Shah Amit <am...@hotmail.com>.
Hi Ate,

Thanks a lot for the quick reply.

I am "submitting" a form with <html:form method="post" 
action="/showPage.do"> and here is the action mapping

        <action path="/showPage"
            type="com.company.struts.actions.ViewerActions"
            name="viewerForm" scope="request" validate="false" 
parameter="dispatch">
            <forward name="success" 
path="/WEB-INF/view/rule5/rule5viewer.jsp"/>
        </action>

So probably my question would be is it possible to submit a form to a render 
URL at all ... I guess No ?? ... So in that case, I will have to use a dummy 
action with redirect="true" ?? ..


Thanks,
Amit

----Original Message Follows----
From: Ate Douma <at...@douma.nu>
Reply-To: "Jetspeed Users List" <je...@jakarta.apache.org>
To: Jetspeed Users List <je...@jakarta.apache.org>
Subject: Re: Struts Bridge - ActionRequest Related Question
Date: Fri, 01 Apr 2005 16:56:58 +0200

You *must* be using action URLs because this warning is *only* displayed
from within processAction handling. Just make sure to use render URLs.


Shah Amit wrote:
>Hi all,
>
>Please pardon my stupidity with the Struts bridge. I have read the 
>documentation several times, and I understand what it says. However I have 
>a little bit trouble visualizing it in my scenerio.
>
>I have a page with 3 dropdowns. Each dropdown has an onChange="submit" 
>thing and the secod dropdown is loaded based on value of first, third is 
>loaded based on second. And then there is a table on the page that is 
>loaded based on the selection of third dropdown.
>
>I am using DispatchAction so that I have only one Action Class per page. 
>Now this is an all display only page and actually the "state" is not being 
>changed at all I think. In this case, for each form submission from the 
>dropdowns, I am directly using render Actions and I dont have any forwards 
>with redirects="true". Due to this I am getting a Warning from 
>struts-bridge that -- "Using the original action URL for render URL:  A 
>redirect should have been issued". So in such scenerios, should I have a 
>dummy action which does nothing and has a forward with redirect="true" to 
>my render action ??
>
>I am sorry to ask this long question, but it is a little bit confusing to 
>me .. :-(
>
>Thanks,
>Amit
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>
>


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



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


Re: Struts Bridge - ActionRequest Related Question

Posted by Ate Douma <at...@douma.nu>.
You *must* be using action URLs because this warning is *only* displayed
from within processAction handling. Just make sure to use render URLs.


Shah Amit wrote:
> Hi all,
> 
> Please pardon my stupidity with the Struts bridge. I have read the 
> documentation several times, and I understand what it says. However I 
> have a little bit trouble visualizing it in my scenerio.
> 
> I have a page with 3 dropdowns. Each dropdown has an onChange="submit" 
> thing and the secod dropdown is loaded based on value of first, third is 
> loaded based on second. And then there is a table on the page that is 
> loaded based on the selection of third dropdown.
> 
> I am using DispatchAction so that I have only one Action Class per page. 
> Now this is an all display only page and actually the "state" is not 
> being changed at all I think. In this case, for each form submission 
> from the dropdowns, I am directly using render Actions and I dont have 
> any forwards with redirects="true". Due to this I am getting a Warning 
> from struts-bridge that -- "Using the original action URL for render 
> URL:  A redirect should have been issued". So in such scenerios, should 
> I have a dummy action which does nothing and has a forward with 
> redirect="true" to my render action ??
> 
> I am sorry to ask this long question, but it is a little bit confusing 
> to me .. :-(
> 
> Thanks,
> Amit
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 
> 
> 
> 


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