struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alberto A. Flores" <aaflo...@gmail.com>
Subject Re: struts 1.2.9 and cancel button
Date Fri, 07 Dec 2007 14:47:32 GMT
By the way, have you considered using Struts 1.3.8? I have code 
(currently) that works just fine and that does what you need (forward to 
a *.do on cancel).

Clearly, you don't need to upgrade right now (you can handle your use 
case in your method controller), however it's worth considering since 
1.3.8 solves a lot bugs and security fixes.

Garner, Shawn wrote:
> Yeah, we have preprocessing to do.
> I've hardly ever went right to a JSP page and this seems to be pretty common from the
Struts Apps I've seen.
> I'd say after the action has been processed it would be a good idea to clear it from
the request like you said.
> 
> Shawn
> -----Original Message-----
> From: paulus.benedictus@gmail.com on behalf of Paul Benedict
> Sent: Thu 12/6/2007 10:24 PM
> To: Struts Users Mailing List
> Subject: Re: struts 1.2.9 and cancel button
>  
> Unless you actually have processing to do, there's no reason to forward to
> /landingPage.do. You should be forwarding straight to your JSP or Tile
> instead.
> 
> The problem here is because you are chaining actions within one request. I
> don't know if it is a bug for Struts not to reset the cancel token after an
> action. I believe it's the request that's canceled, not the action, but
> there's probably a good argument for your expectation.
> 
> Paul
> 
> On Dec 6, 2007 4:55 PM, Garner, Shawn <Garner.Shawn@principal.com> wrote:
> 
>> Yeah, I had to step through.
>> Alright I found the problem and if you ask me it is a bug with struts
>> request processor.
>> It does read in the cancellable on the action for the page I press the
>> cancel button on, skips validation, hits the action and I see it.
>> Now when I return my forward I'm going to a /landingPage.do
>> Now the request processor is hit again and it still hits
>> request.getAttribute(Globals.CANCEL_KEY) but since the landing page
>> doesn't have cancellable in the mapping you get the exception.
>>
>> If you ask me once it checks request.getAttribute(Globals.CANCEL_KEY) it
>> should remove it from the request.
>>
>> I fixed it by adding <set-property property="cancellable" value="true"/>
>> to the landing mapping but but I don't think you should have to do that
>> since it was already processed once by the request processor.
>>
>> Shawn
>>
>> -----Original Message-----
>> From: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com]
>> On Behalf Of Paul Benedict
>> Sent: Thursday, December 06, 2007 4:38 PM
>> To: Struts Users Mailing List
>> Subject: Re: struts 1.2.9 and cancel button
>>
>> Have you attempted to set a breakpoint in the Controller and step
>> through
>> the cancellable check?
>>
>> On Dec 6, 2007 4:17 PM, Garner, Shawn <Garner.Shawn@principal.com>
>> wrote:
>>
>>> <action path="/configureReport"
>>>                        name="reportForm"
>>>                   parameter="action"
>>>                        type="my.comp.Action"
>>>                       scope="request"
>>>                    validate="true"
>>>                       input="contrib.reports.page">
>>>                    <set-property property="cancellable" value="true"/>
>>>                <forward name="open" path="contrib.reports.page" />
>>>
>>>                <forward name="launch" path="contrib.reports.page" />
>>>                </action>
>>>
>>> <html:form action="/configureReport">
>>>
>>> And there is only one defined in the struts config.
>>>
>>> -----Original Message-----
>>> From: Alberto A. Flores [mailto:aaflores@gmail.com]
>>> Sent: Thursday, December 06, 2007 2:46 PM
>>> To: Struts Users Mailing List
>>> Subject: Re: struts 1.2.9 and cancel button
>>>
>>> Can you confirm that your form is pointing to the right path?
>>>
>>> Also, check that you are not overriding the same path (in struts
>> config)
>>> with a similar path <action path="..."/> are overrideable.
>>>
>>>
>>>
>>> Garner, Shawn wrote:
>>>> >From the stack track it looks like the Mapping.isCancellable is
>>>> returning false.
>>>> How can this be?  It is in the struts-config.xml under the right
>>> action.
>>>> Shawn
>>>>
>>>> -----Original Message-----
>>>> From: Garner, Shawn
>>>> Sent: Thursday, December 06, 2007 1:27 PM
>>>> To: Struts Users Mailing List
>>>> Subject: RE: struts 1.2.9 and cancel button
>>>>
>>>> I wonder if it is because we are using ValidatorPlugin or
>>>> LookupDispatchAction.
>>>>
>>>> Seems like it isn't getting past the validations so it never gets to
>>> the
>>>> action:
>>>>
>>>> 2007,org.apache.struts.action.InvalidCancelException
>>>>
>> org.apache.struts.action.InvalidCancelException,,,,,,,,,E,,,,000000003,,
>>>> ,,,
>>>> org.apache.struts.action.InvalidCancelException       at
>>>>
>> org.apache.struts.action.RequestProcessor.processValidate(RequestProcess
>>>> or.java:942)  at
>>>>
>> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
>>>> 207)  at
>>>>
>> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>>>> at
>>> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
>>>> at
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Garner, Shawn
>>>> Sent: Thursday, December 06, 2007 12:39 PM
>>>> To: Struts Users Mailing List
>>>> Subject: RE: struts 1.2.9 and cancel button
>>>>
>>>> I verified it was the right action, the one in the JSP form matches
>>> the
>>>> action config in the struts config.
>>>>
>>>> Shawn
>>>>
>>>> -----Original Message-----
>>>> From: paulus.benedictus@gmail.com
>> [mailto:paulus.benedictus@gmail.com]
>>>> On Behalf Of Paul Benedict
>>>> Sent: Thursday, December 06, 2007 9:59 AM
>>>> To: Struts Users Mailing List
>>>> Subject: Re: struts 1.2.9 and cancel button
>>>>
>>>> Did you add <set-property> to the correct action mapping?
>>>>
>>>> On Dec 6, 2007 9:42 AM, Garner, Shawn <Garner.Shawn@principal.com>
>>>> wrote:
>>>>
>>>>> We trying to use the htm:cancel button but it is not working.
>>>>>
>>>>> I've followed the instructions here
>>>>>
>>>>>
>> http://wiki.apache.org/struts/StrutsUpgradeNotes128to129#head-e417741603
>>>>> dac43bb4fbde589271c568309643e4
>>>>>
>>>>>
>>>>>
>>>>> but we are still getting a
>>>>> org.apache.struts.action.InvalidCancelException
>>>>>
>>>>>
>>>>>
>>>>> We're using the validator plugin.
>>>>>
>>>>> We added <set-property property="cancellable" value="true"/>
>>>>>
>>>>> And
>>>>>
>>>>> <exception key="button.cancel"
>>>>>
>>>>> type="org.apache.struts.action.InvalidCancelException"
>>>>>                   path="ourAction.do?action=open"/>
>>>>>
>>>>> where button.cancel is the resource bundle key that gets displayed
>>> for
>>>>> the button.
>>>>>
>>>>>
>>>>>
>>>>> It appears from the stack trace that validations are still being
>>>> called.
>>>>> Any help would be appreciated.
>>>>>
>>>>>
>>>>>
>>>>> Shawn
>>>>>
>>>>>
>>>>>
>>>>> -----Message Disclaimer-----
>>>>>
>>>>> This e-mail message is intended only for the use of the individual
>> or
>>>>> entity to which it is addressed, and may contain information that
>> is
>>>>> privileged, confidential and exempt from disclosure under
>> applicable
>>>> law.
>>>>> If you are not the intended recipient, any dissemination,
>>> distribution
>>>> or
>>>>> copying of this communication is strictly prohibited. If you have
>>>>> received this communication in error, please notify us immediately
>> by
>>>>> reply email to Connect@principal.com and delete or destroy all
>> copies
>>>> of
>>>>> the original message and attachments thereto. Email sent to or from
>>>> the
>>>>> Principal Financial Group or any of its member companies may be
>>>> retained
>>>>> as required by law or regulation.
>>>>>
>>>>> Nothing in this message is intended to constitute an Electronic
>>>> signature
>>>>> for purposes of the Uniform Electronic Transactions Act (UETA) or
>> the
>>>>> Electronic Signatures in Global and National Commerce Act
>> ("E-Sign")
>>
>>>>> unless a specific statement to the contrary is included in this
>>>> message.
>>>>> While this communication may be used to promote or market a
>>>> transaction
>>>>> or an idea that is discussed in the publication, it is intended to
>>>> provide
>>>>> general information about the subject matter covered and is
>> provided
>>>> with
>>>>> the understanding that The Principal is not rendering legal,
>>>> accounting,
>>>>> or tax advice. It is not a marketed opinion and may not be used to
>>>> avoid
>>>>> penalties under the Internal Revenue Code. You should consult with
>>>>> appropriate counsel or other advisors on all matters pertaining to
>>>> legal,
>>>>> tax, or accounting obligations and requirements.
>>>>>
>>>>
>>>> -----Message Disclaimer-----
>>>>
>>>> This e-mail message is intended only for the use of the individual
>> or
>>>> entity to which it is addressed, and may contain information that is
>>>> privileged, confidential and exempt from disclosure under applicable
>>>> law.
>>>> If you are not the intended recipient, any dissemination,
>> distribution
>>>> or
>>>> copying of this communication is strictly prohibited. If you have
>>>> received this communication in error, please notify us immediately
>> by
>>>> reply email to Connect@principal.com and delete or destroy all
>> copies
>>> of
>>>> the original message and attachments thereto. Email sent to or from
>>> the
>>>> Principal Financial Group or any of its member companies may be
>>> retained
>>>> as required by law or regulation.
>>>>
>>>> Nothing in this message is intended to constitute an Electronic
>>>> signature
>>>> for purposes of the Uniform Electronic Transactions Act (UETA) or
>> the
>>>> Electronic Signatures in Global and National Commerce Act ("E-Sign")
>>>> unless a specific statement to the contrary is included in this
>>> message.
>>>> While this communication may be used to promote or market a
>>> transaction
>>>> or an idea that is discussed in the publication, it is intended to
>>>> provide
>>>> general information about the subject matter covered and is provided
>>>> with
>>>> the understanding that The Principal is not rendering legal,
>>> accounting,
>>>> or tax advice. It is not a marketed opinion and may not be used to
>>> avoid
>>>> penalties under the Internal Revenue Code. You should consult with
>>>> appropriate counsel or other advisors on all matters pertaining to
>>>> legal,
>>>> tax, or accounting obligations and requirements.
>>>>
>>>>
>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>> -----Message Disclaimer-----
>>>>
>>>> This e-mail message is intended only for the use of the individual
>> or
>>>> entity to which it is addressed, and may contain information that is
>>>> privileged, confidential and exempt from disclosure under applicable
>>>> law.
>>>> If you are not the intended recipient, any dissemination,
>> distribution
>>>> or
>>>> copying of this communication is strictly prohibited. If you have
>>>> received this communication in error, please notify us immediately
>> by
>>>> reply email to Connect@principal.com and delete or destroy all
>> copies
>>> of
>>>> the original message and attachments thereto. Email sent to or from
>>> the
>>>> Principal Financial Group or any of its member companies may be
>>> retained
>>>> as required by law or regulation.
>>>>
>>>> Nothing in this message is intended to constitute an Electronic
>>>> signature
>>>> for purposes of the Uniform Electronic Transactions Act (UETA) or
>> the
>>>> Electronic Signatures in Global and National Commerce Act ("E-Sign")
>>>> unless a specific statement to the contrary is included in this
>>> message.
>>>> While this communication may be used to promote or market a
>>> transaction
>>>> or an idea that is discussed in the publication, it is intended to
>>>> provide
>>>> general information about the subject matter covered and is provided
>>>> with
>>>> the understanding that The Principal is not rendering legal,
>>> accounting,
>>>> or tax advice. It is not a marketed opinion and may not be used to
>>> avoid
>>>> penalties under the Internal Revenue Code. You should consult with
>>>> appropriate counsel or other advisors on all matters pertaining to
>>>> legal,
>>>> tax, or accounting obligations and requirements.
>>>>
>>>>
>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>> -----Message Disclaimer-----
>>>>
>>>> This e-mail message is intended only for the use of the individual
>> or
>>>> entity to which it is addressed, and may contain information that is
>>>> privileged, confidential and exempt from disclosure under applicable
>>> law.
>>>> If you are not the intended recipient, any dissemination,
>> distribution
>>> or
>>>> copying of this communication is strictly prohibited. If you have
>>>> received this communication in error, please notify us immediately
>> by
>>>> reply email to Connect@principal.com and delete or destroy all
>> copies
>>> of
>>>> the original message and attachments thereto. Email sent to or from
>>> the
>>>> Principal Financial Group or any of its member companies may be
>>> retained
>>>> as required by law or regulation.
>>>>
>>>> Nothing in this message is intended to constitute an Electronic
>>> signature
>>>> for purposes of the Uniform Electronic Transactions Act (UETA) or
>> the
>>>> Electronic Signatures in Global and National Commerce Act ("E-Sign")
>>>> unless a specific statement to the contrary is included in this
>>> message.
>>>> While this communication may be used to promote or market a
>>> transaction
>>>> or an idea that is discussed in the publication, it is intended to
>>> provide
>>>> general information about the subject matter covered and is provided
>>> with
>>>> the understanding that The Principal is not rendering legal,
>>> accounting,
>>>> or tax advice. It is not a marketed opinion and may not be used to
>>> avoid
>>>> penalties under the Internal Revenue Code. You should consult with
>>>> appropriate counsel or other advisors on all matters pertaining to
>>> legal,
>>>> tax, or accounting obligations and requirements.
>>>>
>>>>
>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>
>>> -----Message Disclaimer-----
>>>
>>> This e-mail message is intended only for the use of the individual or
>>> entity to which it is addressed, and may contain information that is
>>> privileged, confidential and exempt from disclosure under applicable
>> law.
>>> If you are not the intended recipient, any dissemination, distribution
>> or
>>> copying of this communication is strictly prohibited. If you have
>>> received this communication in error, please notify us immediately by
>>> reply email to Connect@principal.com and delete or destroy all copies
>> of
>>> the original message and attachments thereto. Email sent to or from
>> the
>>> Principal Financial Group or any of its member companies may be
>> retained
>>> as required by law or regulation.
>>>
>>> Nothing in this message is intended to constitute an Electronic
>> signature
>>> for purposes of the Uniform Electronic Transactions Act (UETA) or the
>>> Electronic Signatures in Global and National Commerce Act ("E-Sign")
>>> unless a specific statement to the contrary is included in this
>> message.
>>> While this communication may be used to promote or market a
>> transaction
>>> or an idea that is discussed in the publication, it is intended to
>> provide
>>> general information about the subject matter covered and is provided
>> with
>>> the understanding that The Principal is not rendering legal,
>> accounting,
>>> or tax advice. It is not a marketed opinion and may not be used to
>> avoid
>>> penalties under the Internal Revenue Code. You should consult with
>>> appropriate counsel or other advisors on all matters pertaining to
>> legal,
>>> tax, or accounting obligations and requirements.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>> -----Message Disclaimer-----
>>
>> This e-mail message is intended only for the use of the individual or
>> entity to which it is addressed, and may contain information that is
>> privileged, confidential and exempt from disclosure under applicable law.
>> If you are not the intended recipient, any dissemination, distribution or
>> copying of this communication is strictly prohibited. If you have
>> received this communication in error, please notify us immediately by
>> reply email to Connect@principal.com and delete or destroy all copies of
>> the original message and attachments thereto. Email sent to or from the
>> Principal Financial Group or any of its member companies may be retained
>> as required by law or regulation.
>>
>> Nothing in this message is intended to constitute an Electronic signature
>> for purposes of the Uniform Electronic Transactions Act (UETA) or the
>> Electronic Signatures in Global and National Commerce Act ("E-Sign")
>> unless a specific statement to the contrary is included in this message.
>>
>> While this communication may be used to promote or market a transaction
>> or an idea that is discussed in the publication, it is intended to provide
>> general information about the subject matter covered and is provided with
>> the understanding that The Principal is not rendering legal, accounting,
>> or tax advice. It is not a marketed opinion and may not be used to avoid
>> penalties under the Internal Revenue Code. You should consult with
>> appropriate counsel or other advisors on all matters pertaining to legal,
>> tax, or accounting obligations and requirements.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> 
> -----Message Disclaimer-----
> 
> This e-mail message is intended only for the use of the individual or
> entity to which it is addressed, and may contain information that is
> privileged, confidential and exempt from disclosure under applicable law.
> If you are not the intended recipient, any dissemination, distribution or
> copying of this communication is strictly prohibited. If you have
> received this communication in error, please notify us immediately by
> reply email to Connect@principal.com and delete or destroy all copies of
> the original message and attachments thereto. Email sent to or from the
> Principal Financial Group or any of its member companies may be retained
> as required by law or regulation.
> 
> Nothing in this message is intended to constitute an Electronic signature
> for purposes of the Uniform Electronic Transactions Act (UETA) or the
> Electronic Signatures in Global and National Commerce Act ("E-Sign")
> unless a specific statement to the contrary is included in this message.
> 
> While this communication may be used to promote or market a transaction
> or an idea that is discussed in the publication, it is intended to provide
> general information about the subject matter covered and is provided with
> the understanding that The Principal is not rendering legal, accounting,
> or tax advice. It is not a marketed opinion and may not be used to avoid
> penalties under the Internal Revenue Code. You should consult with
> appropriate counsel or other advisors on all matters pertaining to legal,
> tax, or accounting obligations and requirements.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message