You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Allen Gilliland <al...@sun.com> on 2007/05/03 22:20:51 UTC

[s2] problem with action chaining returning "input" result

when chaining from one action to another, why is struts2 trying to 
lookup the "input" result on action2 before ever executing my action method?

i have a simple config, like the examples in the documentation ...

<action name="members!*" method="{1}"
         class="org.apache.roller.ui.authoring.struts2.Members">
     <result name="list" type="tiles">.Members</result>
</action>

<action name="invite!*" method="{1}"
         class="org.apache.roller.ui.authoring.struts2.MembersInvite">
     <result name="input" type="tiles">.MembersInvite</result>
     <result name="disabled" type="tiles">.disabled</result>
     <result name="success" type="chain">members</result>
</action>

when i execute the 'invite' action it stores an invitation in the db and 
adds an action message to notify the user and then i return SUCCESS, 
which should just chain to the execute() method of my 'members' action 
right?

well when i do this everything works properly in the 'invite' action and 
through debugging i can see that my 'members' action class is 
instantiated as if it's going to be executed, but the execute() method 
is never called and struts2 gives an error about not being able to find 
the "input" result on my 'members' action.  why is this happening?

No result defined for action 
org.apache.roller.ui.authoring.struts2.Members and result input

-- Allen

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


Re: [s2] problem with action chaining returning "input" result

Posted by Daniel Ruan <da...@gmail.com>.
Or maybe the @SkipValidation annotation?

On 5/3/07, Martin Gainty <mg...@hotmail.com> wrote:
>
> struts-default.xml has the ability to exclude methods as in this example
> which excludes methods (method1, method2) from validation
>
> <interceptor-ref name="defaultStack">
> <param name="validation.excludeMethods">method1,method2</param>
> </interceptor-ref>
>
> Martin--
>

Re: [s2] problem with action chaining returning "input" result

Posted by Martin Gainty <mg...@hotmail.com>.
struts-default.xml has the ability to exclude methods as in this example 
which excludes methods (method1, method2) from validation

<interceptor-ref name="defaultStack">
<param name="validation.excludeMethods">method1,method2</param>
</interceptor-ref>

Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Dave Newton" <ne...@yahoo.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, May 03, 2007 9:38 PM
Subject: Re: [s2] problem with action chaining returning "input" result


> --- Allen Gilliland <al...@sun.com> wrote:
>> I can't see any reason why validation would be doing
>> anything at all unless somehow the validation
>> interceptor wants to use one of the methods in my
>> action class for validation when i didn't intend
>> that.
>
> So you have no *-validation.xml files? No methods
> named validate*?
>
> Hrm.
>
> d
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 


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


Re: [s2] problem with action chaining returning "input" result

Posted by Dave Newton <ne...@yahoo.com>.
--- Allen Gilliland <al...@sun.com> wrote:
> So, now all I really need to know is if there is a
> way that I can just flat out disable all of
struts2's
> validation stuff but still have my actions extend 
> ActionSupport?  

Create an interceptor stack without the validation
stuff.

> I would also technically consider this a bug because
> IMO I should be allowed to set action errors and 
> chain to other actions without having 
> validation break my chaining.

It's not a bug, it's a feature!

(Jokes aside, I would not in any way consider that a
bug.)

> My guess is that the validation code is 
> using the hasActionErrors() method to determine if
> the 'input' result should be sent after validation, 
> but that seems suboptimal.  It would be better if
the
> validation actually tracked if it had actually
failed
>  any of its validation checks and only modify the 
> result then, not just because there is an action 
> error.

But that's what the validation stuff is for; if
there's errors, go back to the input, regardless of
where the errors came from. That requires less work on
the programmers side: add an error, it goes back to
the input that caused the error.

If you want to circumvent default behavior just
redefine your interceptor stack, although you'll lose
the built-in validation handling then.

d.



 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

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


Re: [s2] problem with action chaining returning "input" result

Posted by Allen Gilliland <al...@sun.com>.
Thanks Laurie, that was what I needed to do.

Turns out that my action was setting an action error before doing its 
chaining and so when validation was triggered on the chained action it 
was thinking an error had occurred and forcing the "input" result.

So, now all I really need to know is if there is a way that I can just 
flat out disable all of struts2's validation stuff but still have my 
actions extend ActionSupport?  Is there something I can put in my 
struts.xml file to prevent validation from running against my actions?

I would also technically consider this a bug because IMO I should be 
allowed to set action errors and chain to other actions without having 
validation break my chaining.  My guess is that the validation code is 
using the hasActionErrors() method to determine if the 'input' result 
should be sent after validation, but that seems suboptimal.  It would be 
better if the validation actually tracked if it had actually failed any 
of its validation checks and only modify the result then, not just 
because there is an action error.

-- Allen


Laurie Harper wrote:
> As well as validation errors, there could still be conversion errors. 
> You said you don't have any conversions configured but remember that 
> Struts will apply default converters if you have any setters on the 
> action that take non-String arguments (assuming the request includes an 
> attribute that matches that setter).
> 
> I would suggest setting up an 'input' result pointing to a simple JSP 
> page with s:actionerror, s:actionmessage and s:debug tags on it. Maybe 
> you'll find a clue as to what's wrong there.
> 
> L.
> 
> Allen Gilliland wrote:
>>
>>
>> Dave Newton wrote:
>>> --- Allen Gilliland <al...@sun.com> wrote:
>>>> I can't see any reason why validation would be doing
>>>> anything at all unless somehow the validation interceptor wants to 
>>>> use one of the methods in my action class for validation when i 
>>>> didn't intend that.
>>>
>>> So you have no *-validation.xml files? No methods
>>> named validate*?
>>
>> nope, no *-validation.xml files and no validate* methods.  i do have a 
>> myValidate() method in some actions which i started using after 
>> realizing that i couldn't use validate().
>>
>> -- Allen
>>
>>
>>>
>>> Hrm.
>>>
>>> d
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam?  Yahoo! Mail has the best spam protection around 
>>> http://mail.yahoo.com
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

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


Re: [s2] problem with action chaining returning "input" result

Posted by Laurie Harper <la...@holoweb.net>.
As well as validation errors, there could still be conversion errors. 
You said you don't have any conversions configured but remember that 
Struts will apply default converters if you have any setters on the 
action that take non-String arguments (assuming the request includes an 
attribute that matches that setter).

I would suggest setting up an 'input' result pointing to a simple JSP 
page with s:actionerror, s:actionmessage and s:debug tags on it. Maybe 
you'll find a clue as to what's wrong there.

L.

Allen Gilliland wrote:
> 
> 
> Dave Newton wrote:
>> --- Allen Gilliland <al...@sun.com> wrote:
>>> I can't see any reason why validation would be doing
>>> anything at all unless somehow the validation interceptor wants to 
>>> use one of the methods in my action class for validation when i 
>>> didn't intend that.
>>
>> So you have no *-validation.xml files? No methods
>> named validate*?
> 
> nope, no *-validation.xml files and no validate* methods.  i do have a 
> myValidate() method in some actions which i started using after 
> realizing that i couldn't use validate().
> 
> -- Allen
> 
> 
>>
>> Hrm.
>>
>> d
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around 
>> http://mail.yahoo.com
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>


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


Re: [s2] problem with action chaining returning "input" result

Posted by Allen Gilliland <al...@sun.com>.

Dave Newton wrote:
> --- Allen Gilliland <al...@sun.com> wrote:
>> I can't see any reason why validation would be doing
>> anything at all unless somehow the validation 
>> interceptor wants to use one of the methods in my 
>> action class for validation when i didn't intend 
>> that.
> 
> So you have no *-validation.xml files? No methods
> named validate*?

nope, no *-validation.xml files and no validate* methods.  i do have a 
myValidate() method in some actions which i started using after 
realizing that i couldn't use validate().

-- Allen


> 
> Hrm.
> 
> d
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

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


Re: [s2] problem with action chaining returning "input" result

Posted by Dave Newton <ne...@yahoo.com>.
--- Allen Gilliland <al...@sun.com> wrote:
> I can't see any reason why validation would be doing
> anything at all unless somehow the validation 
> interceptor wants to use one of the methods in my 
> action class for validation when i didn't intend 
> that.

So you have no *-validation.xml files? No methods
named validate*?

Hrm.

d

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [s2] problem with action chaining returning "input" result

Posted by Allen Gilliland <al...@sun.com>.

Dave Newton wrote:
> --- Allen Gilliland <al...@sun.com> wrote:
>> public abstract class UIAction extends ActionSupport
> 
> Okay, so now the question is why it thinks there's a
> validation error on your subclass-we know *why* it's
> trying to validate (ActionSupport implements the
> validation interfaces).
> 
> Are there *any* validation files (etc) in your app?
> Any that are for the model being submitted to the
> subclass? Does the superclass implement a validation
> method?

Any validation that is happening would be accidental, I have not 
configured anything to actually try to use the struts2 validation.

This is the top of my config where all the interesting stuff happens, 
everything else is just action definitions and none of my actions 
contain any elements other than results.

<!-- Weblogger default package -->
     <package name="weblogger" namespace="/roller-ui" 
extends="struts-default">

         <!-- Define Tiles result type -->
         <result-types>
             <result-type name="tiles" 
class="org.apache.struts2.views.tiles.TilesResult" />
         </result-types>

         <!-- define our own interceptors and a custom interceptor stack -->
         <interceptors>
             <interceptor name="UIActionInterceptor"
 
class="org.apache.roller.ui.core.util.struts2.UIActionInterceptor" />
             <interceptor name="UISecurityInterceptor"
 
class="org.apache.roller.ui.core.util.struts2.UISecurityInterceptor" />
             <interceptor name="UIActionPrepareInterceptor"
 
class="org.apache.roller.ui.core.util.struts2.UIActionPrepareInterceptor" />

             <interceptor-stack name="rollerStack">
                 <interceptor-ref name="defaultStack"/>
                 <interceptor-ref name="UIActionInterceptor"/>
                 <interceptor-ref name="UISecurityInterceptor"/>
                 <interceptor-ref name="UIActionPrepareInterceptor"/>
             </interceptor-stack>
         </interceptors>

         <!-- use our own interceptor stack which extends the default 
stack -->
         <default-interceptor-ref name="rollerStack"/>


I can't see any reason why validation would be doing anything at all 
unless somehow the validation interceptor wants to use one of the 
methods in my action class for validation when i didn't intend that.

-- Allen


> 
> Process of elimination :)
> 
> d.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

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


Re: [s2] problem with action chaining returning "input" result

Posted by Dave Newton <ne...@yahoo.com>.
--- Allen Gilliland <al...@sun.com> wrote:
> public abstract class UIAction extends ActionSupport

Okay, so now the question is why it thinks there's a
validation error on your subclass-we know *why* it's
trying to validate (ActionSupport implements the
validation interfaces).

Are there *any* validation files (etc) in your app?
Any that are for the model being submitted to the
subclass? Does the superclass implement a validation
method?

Process of elimination :)

d.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [s2] problem with action chaining returning "input" result

Posted by Allen Gilliland <al...@sun.com>.

Dave Newton wrote:
> --- Allen Gilliland <al...@sun.com> wrote:
>> [...] i removed all my old validation() methods so i
> 
>> know it's not that.
>>
>> public class Members extends UIAction 
> 
> What does UIAction look like (specifically with
> regards to interfaces implements and superclasses)?

UIAction is a base class which all of my actions extend and basically it 
just builds some additional application specific features on top of the 
ActionSupport class.  I won't include the whole thing, but here's a 
sample ...

public abstract class UIAction extends ActionSupport
         implements UIActionPreparable, UISecurityEnforced {

     // a common result name used to indicate the result should list 
some data
     public static final String LIST = "list";

     // the authenticated user accessing this action, or null if client 
is not logged in
     private UserData authenticatedUser = null;

     // the weblog this action is intended to work on, or null if no 
weblog specified
     private WebsiteData actionWeblog = null;

     // page title
     protected String pageTitle = null;


     public void myPrepare() {
         // no-op
     }

     public String getAbsoluteSiteURL() {
         return RollerRuntimeConfig.getAbsoluteContextURL();
     }

     // access an application config property
     public String getProp(String key) {
         // first try static config
         String value = RollerConfig.getProperty(key);
         if(value == null) {
             value = RollerRuntimeConfig.getProperty(key);
         }

         return (value == null) ? key : value;
     }

     public void addError(String errorKey) {
         addActionError(getText(errorKey));
     }

     public void addError(String errorKey, String param) {
         addActionError(getText(errorKey, errorKey, param));
     }

     public void addError(String errorKey, List args) {
         addActionError(getText(errorKey, args));
     }

     // list of locales to display in web form dropdowns
     public List getLocalesList() {
         return UIUtils.getLocales();
     }

     // list of time zones to display in web form dropdowns
     public List getTimeZonesList() {
         return UIUtils.getTimeZones();
     }

}


As I said above, all my actions extend UIAction, so I would think if 
there were a problem there then i would be seeing it on all my actions.

The 2 interfaces it implements are custom interfaces which work 
basically the same way the struts2 XXXAware interfaces work.  They are 
coupled with custom interceptors which take a look at the request/action 
before the action method is executed and do some prework.  This is what 
they look like ...

public interface UIActionPreparable {

     public void myPrepare();
}

public interface UISecurityEnforced {

     public boolean isUserRequired();

     public boolean isWeblogRequired();

     public String requiredUserRole();

     public short requiredWeblogPermissions();
}


 From the debugging output I can see that when struts2 is trying to 
execute the action I am chaining to it never actually gets to my custom 
interceptors, so I don't think the problem is there.  Plus, none of my 
custom interceptors return "input" as a result.

not sure what else it could be :(

-- Allen


> 
> There must be *some* reason validation is running.
> 
> d.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

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


Re: [s2] problem with action chaining returning "input" result

Posted by Dave Newton <ne...@yahoo.com>.
--- Allen Gilliland <al...@sun.com> wrote:
> [...] i removed all my old validation() methods so i

> know it's not that.
> 
> public class Members extends UIAction 

What does UIAction look like (specifically with
regards to interfaces implements and superclasses)?

There must be *some* reason validation is running.

d.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [s2] problem with action chaining returning "input" result

Posted by Allen Gilliland <al...@sun.com>.

Laurie Harper wrote:
> Allen Gilliland wrote:
>> when chaining from one action to another, why is struts2 trying to 
>> lookup the "input" result on action2 before ever executing my action 
>> method?
>>
>> i have a simple config, like the examples in the documentation ...
>>
>> <action name="members!*" method="{1}"
>>         class="org.apache.roller.ui.authoring.struts2.Members">
>>     <result name="list" type="tiles">.Members</result>
>> </action>
>>
>> <action name="invite!*" method="{1}"
>>         class="org.apache.roller.ui.authoring.struts2.MembersInvite">
>>     <result name="input" type="tiles">.MembersInvite</result>
>>     <result name="disabled" type="tiles">.disabled</result>
>>     <result name="success" type="chain">members</result>
>> </action>
>>
>> when i execute the 'invite' action it stores an invitation in the db 
>> and adds an action message to notify the user and then i return 
>> SUCCESS, which should just chain to the execute() method of my 
>> 'members' action right?
>>
>> well when i do this everything works properly in the 'invite' action 
>> and through debugging i can see that my 'members' action class is 
>> instantiated as if it's going to be executed, but the execute() method 
>> is never called and struts2 gives an error about not being able to 
>> find the "input" result on my 'members' action.  why is this happening?
>>
>> No result defined for action 
>> org.apache.roller.ui.authoring.struts2.Members and result input
> 
> Well, firstly, you don't have a result named 'input' on your members 
> action... but I guess you're more interested in why Struts is looking 
> for it :-)

yep, and i don't need an 'input' result on that action.  the baffling 
part to me is why struts2 is even trying to look for that result when 
nothing in my action returns that result.


> 
> Does the members action have any conversion or validation configured? 
> Struts will automatically forward to the 'input' result if errors occur 
> during conversion or validation. If that's not it, you'll need to post 
> more details, such as your action code and anything written to the logs 
> as the request is being processed.

nope, no conversion or validation.  i ran into the problem with the 
validation interceptor when i first started working with struts2 and 
mistakenly had a validation() method in my action without realizing 
struts2 was going to execute that method without my knowledge, but i 
removed all my old validation() methods so i know it's not that.

i'll post the skeleton of the action class if that will help, but it's 
quite simple.

public class Members extends UIAction implements ParameterAware {

     private static Log log = LogFactory.getLog(Members.class);

     // raw parameters from request
     private Map parameters = Collections.EMPTY_MAP;


     public Members() {
         log.debug("Instantiating members action");
     }

     public String execute() {

         log.debug("Showing weblog members page");

         return LIST;
     }

     public String save() {

         log.debug("Attempting to processing weblog permissions updates");

         ... do work ...

         return LIST;
     }

     // convenience for accessing a single parameter with a single value
     public String getParameter(String key) ...

     public Map getParameters() ...

     public void setParameters(Map parameters) ...
}


here's the full debugging output from my logs showing that the first 
action successfully completes and returns a SUCCESS result which chains 
to the second action, but I can't figure out what is causing struts2 to 
bail on the chain execution before even calling my action method ...

DEBUG 2007-05-03 14:42:57,717 MembersInvite:save - Invitation 
successfully recorded
DEBUG 2007-05-03 14:42:57,727 ActionChainResult:execute - Chaining to 
action members
DEBUG 2007-05-03 14:42:57,729 DefaultActionProxy:<init> - Creating an 
DefaultActionProxy for namespace /roller-ui/authoring and action name 
members
DEBUG 2007-05-03 14:42:57,731 ActionConfigMatcher:match - Attempting to 
match 'members' to a wildcard pattern, 32 available
DEBUG 2007-05-03 14:42:57,733 ActionConfigMatcher:match - Path matches 
pattern 'members!*'
DEBUG 2007-05-03 14:42:57,735 Members:<init> - Instantiating members action
DEBUG 2007-05-03 14:42:57,737 I18nInterceptor:intercept - intercept 
'/roller-ui/authoring/members' {
DEBUG 2007-05-03 14:42:57,739 I18nInterceptor:intercept - 
requested_locale=null
DEBUG 2007-05-03 14:42:57,741 I18nInterceptor:intercept - before 
Locale=en_US
DEBUG 2007-05-03 14:42:57,763 InstantiatingNullHandler:nullPropertyValue 
- Entering nullPropertyValue 
[target=[org.apache.roller.ui.authoring.struts2.Members@1f34d0, 
org.apache.roller.ui.authoring.struts2.MembersInvite@754384, 
com.opensymphony.xwork2.DefaultTextProvider@1262667], property=inviteMember]
DEBUG 2007-05-03 14:42:57,775 InstantiatingNullHandler:nullPropertyValue 
- Entering nullPropertyValue 
[target=[org.apache.roller.ui.authoring.struts2.Members@1f34d0, 
org.apache.roller.ui.authoring.struts2.MembersInvite@754384, 
com.opensymphony.xwork2.DefaultTextProvider@1262667], property=struts]
DEBUG 2007-05-03 14:42:57,791 FileUploadInterceptor:intercept - 
Bypassing /roller-ui/authoring/ members
DEBUG 2007-05-03 14:42:57,793 StaticParametersInterceptor:intercept - 
Setting static parameters {}
DEBUG 2007-05-03 14:42:57,796 ParametersInterceptor:intercept - Setting 
params userName => [ blah ] weblog => [ test ] inviteMember.button.save 
=> [ Send Invitation ] permission => [ 1 ]
DEBUG 2007-05-03 14:42:57,799 InstantiatingNullHandler:nullPropertyValue 
- Entering nullPropertyValue 
[target=[org.apache.roller.ui.authoring.struts2.Members@1f34d0, 
org.apache.roller.ui.authoring.struts2.MembersInvite@754384, 
com.opensymphony.xwork2.DefaultTextProvider@1262667], property=inviteMember]
ERROR 2007-05-03 14:42:57,805 ParametersInterceptor:setParameters - 
ParametersInterceptor - [setParameters]: Unexpected Exception catched: 
Error setting expression 'inviteMember.button.save' with value 
'[Ljava.lang.String;@a3c5b6'
DEBUG 2007-05-03 14:42:57,808 XWorkConverter:getConverter - Property: 
permissionDEBUG 2007-05-03 14:42:57,811 XWorkConverter:getConverter - 
Class: org.apache.roller.ui.authoring.struts2.MembersInvite
DEBUG 2007-05-03 14:42:57,814 XWorkConverter:convertValue - field-level 
type converter for property [permission] = none found
DEBUG 2007-05-03 14:42:57,817 XWorkConverter:convertValue - global-level 
type converter for property [permission] = none found
DEBUG 2007-05-03 14:42:57,821 XWorkConverter:convertValue - falling back 
to default type converter 
[com.opensymphony.xwork2.util.XWorkBasicConverter@1cb4a6a]
DEBUG 2007-05-03 14:42:57,824 XWorkConverter:getConverter - Property: 
userName
DEBUG 2007-05-03 14:42:57,826 XWorkConverter:getConverter - Class: 
org.apache.roller.ui.authoring.struts2.MembersInvite
DEBUG 2007-05-03 14:42:57,828 XWorkConverter:convertValue - field-level 
type converter for property [userName] = none found
DEBUG 2007-05-03 14:42:57,831 XWorkConverter:convertValue - global-level 
type converter for property [userName] = none found
DEBUG 2007-05-03 14:42:57,833 XWorkConverter:convertValue - falling back 
to default type converter 
[com.opensymphony.xwork2.util.XWorkBasicConverter@1cb4a6a]
ERROR 2007-05-03 14:42:57,836 ParametersInterceptor:setParameters - 
ParametersInterceptor - [setParameters]: Unexpected Exception catched: 
Error setting expression 'weblog' with value '[Ljava.lang.String;@182815a'
DEBUG 2007-05-03 14:42:57,838 ValidationInterceptor:doBeforeInvocation - 
Validating /roller-ui/authoring/members with method execute.
DEBUG 2007-05-03 14:42:57,868 DefaultWorkflowInterceptor:doIntercept - 
Invoking validate() on action 
org.apache.roller.ui.authoring.struts2.Members@1f34d0
DEBUG 2007-05-03 14:42:57,871 
PrefixMethodInvocationUtil:getPrefixedMethod - cannot find method 
[validateExecute] in action 
[org.apache.roller.ui.authoring.struts2.Members@1f34d0]
DEBUG 2007-05-03 14:42:57,874 
PrefixMethodInvocationUtil:getPrefixedMethod - cannot find method 
[validateDoExecute] in action 
[org.apache.roller.ui.authoring.struts2.Members@1f34d0]
DEBUG 2007-05-03 14:42:57,876 DefaultWorkflowInterceptor:doIntercept - 
Errors on action org.apache.roller.ui.authoring.struts2.Members@1f34d0, 
returning result name 'input'
ERROR 2007-05-03 14:42:57,881 Dispatcher:serviceAction - Could not find 
action or result
No result defined for action 
org.apache.roller.ui.authoring.struts2.Members and result input - action 
- 
file:/export/home/app/blogs/dev/webserver7/https-gconf/web-app/gconf/_default/WEB-INF/classes/struts.xml:232:72


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

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


Re: [s2] problem with action chaining returning "input" result

Posted by Laurie Harper <la...@holoweb.net>.
Allen Gilliland wrote:
> when chaining from one action to another, why is struts2 trying to 
> lookup the "input" result on action2 before ever executing my action 
> method?
> 
> i have a simple config, like the examples in the documentation ...
> 
> <action name="members!*" method="{1}"
>         class="org.apache.roller.ui.authoring.struts2.Members">
>     <result name="list" type="tiles">.Members</result>
> </action>
> 
> <action name="invite!*" method="{1}"
>         class="org.apache.roller.ui.authoring.struts2.MembersInvite">
>     <result name="input" type="tiles">.MembersInvite</result>
>     <result name="disabled" type="tiles">.disabled</result>
>     <result name="success" type="chain">members</result>
> </action>
> 
> when i execute the 'invite' action it stores an invitation in the db and 
> adds an action message to notify the user and then i return SUCCESS, 
> which should just chain to the execute() method of my 'members' action 
> right?
> 
> well when i do this everything works properly in the 'invite' action and 
> through debugging i can see that my 'members' action class is 
> instantiated as if it's going to be executed, but the execute() method 
> is never called and struts2 gives an error about not being able to find 
> the "input" result on my 'members' action.  why is this happening?
> 
> No result defined for action 
> org.apache.roller.ui.authoring.struts2.Members and result input

Well, firstly, you don't have a result named 'input' on your members 
action... but I guess you're more interested in why Struts is looking 
for it :-)

Does the members action have any conversion or validation configured? 
Struts will automatically forward to the 'input' result if errors occur 
during conversion or validation. If that's not it, you'll need to post 
more details, such as your action code and anything written to the logs 
as the request is being processed.

L.


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