RE: [S2] Action can not redirect with extend pattern?
??? --- TANG Xigen <[EMAIL PROTECTED]> wrote: > thanks very much again! > > > i forgot i add a validation module! > > thanks! > > -Original Message- > From: Dave Newton [mailto:[EMAIL PROTECTED] > Sent: 2007Äê11ÔÂ9ÈÕ 10:59 > To: Struts Users Mailing List > Subject: Re: [S2] Action can not redirect with > extend pattern? > > Hello, > > Most likely your logon action is failing validation > and trys to find the "input" result (which doesn't > exist). > > If you have action methods that should not be > validated you have several options, including: > > - create method-specific (action alias specific) > validations > > - exclude additional methods from the validation > interceptor > > - restructure things a little bit to avoid the issue > altogether (for instance, if you're executing the > input() method validation won't be run) > > There are probably other solutions too that might be > a better fit for your application. > > Dave > > --- TANG Xigen <[EMAIL PROTECTED]> > wrote: > > > Hi All > > > > > > I write a simple self "PlatformActionSupport" to > let it's children can > > redirect to result "start" when url like > "*!start.action", but when i > > test my code, i find some works fine, some > doesn't! > > > > [ Father PlatformActionSupport ] > > @SuppressWarnings("serial") > > public abstract class PlatformActionSupport > extends ActionSupport { > > > > public String doStart() { > > return "start"; > > } > > } > > > > [ ChildA loginAction extend PlatformActionSupport > ] > > @SuppressWarnings("serial") > > public class LoginAction extends > > PlatformActionSupport {} > > > > [ ChildB RegistAction extend PlatformActionSupport > ] > > @SuppressWarnings("serial") > > public class RegistAction extends > > PlatformActionSupport {} > > > > [ Struts.xml ] > > > > > name="com.dztalk.client.webflow.struts.pojos" > > extends="struts-default"> > > > > > > class="com.dztalk.client.webflow.struts.interceptors.LanguageFocusInterc > > eptor"> > > > > > > > name="LanguageFocusInterceptor"> > > > name="defaultStack"> > > > > > > > > > > class="com.dztalk.client.webflow.struts.pojos.LoginAction"> > > > name="default"> > > > name="start">/pages/generals/Logon.jsp > > > > > > > > class="com.dztalk.client.webflow.struts.pojos.RegistAction"> > > > name="default"> > > > name="start">/pages/generals/Regist.jsp > > > > > > > > > > > urlA:"http://localhost:8080/dztalk-webflow/Regist!start.action"; > > --- > > works fine > > > urlB:"http://localhost:8080/dztalk-webflow/Logon!start.action"; > > --- > > failed > > > > exception trace below > > > > Could not find action or result > > No result defined for action > > com.dztalk.client.webflow.struts.pojos.LoginAction > > and result input - > > action > > > > > > [S]: i find urlA call dostart() method in > "PlatformActionSupport" but > > urlB not! > > As struts doc, i think Logon&Regist in my conf > are almost sameness > > action defition with just different name. > > why Logon doesn't > > work in my way? can anyone do me a favor about > this topic! > > > > > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Action can not redirect with extend pattern?
thanks very much again! i forgot i add a validation module! thanks! -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 2007年11月9日 10:59 To: Struts Users Mailing List Subject: Re: [S2] Action can not redirect with extend pattern? Hello, Most likely your logon action is failing validation and trys to find the "input" result (which doesn't exist). If you have action methods that should not be validated you have several options, including: - create method-specific (action alias specific) validations - exclude additional methods from the validation interceptor - restructure things a little bit to avoid the issue altogether (for instance, if you're executing the input() method validation won't be run) There are probably other solutions too that might be a better fit for your application. Dave --- TANG Xigen <[EMAIL PROTECTED]> wrote: > Hi All > > > I write a simple self "PlatformActionSupport" to let it's children can > redirect to result "start" when url like "*!start.action", but when i > test my code, i find some works fine, some doesn't! > > [ Father PlatformActionSupport ] > @SuppressWarnings("serial") > public abstract class PlatformActionSupport extends ActionSupport { > > public String doStart() { > return "start"; > } > } > > [ ChildA loginAction extend PlatformActionSupport ] > @SuppressWarnings("serial") > public class LoginAction extends > PlatformActionSupport {} > > [ ChildB RegistAction extend PlatformActionSupport ] > @SuppressWarnings("serial") > public class RegistAction extends > PlatformActionSupport {} > > [ Struts.xml ] > >name="com.dztalk.client.webflow.struts.pojos" > extends="struts-default"> > > class="com.dztalk.client.webflow.struts.interceptors.LanguageFocusInterc > eptor"> > > >name="LanguageFocusInterceptor"> >name="defaultStack"> > > > > class="com.dztalk.client.webflow.struts.pojos.LoginAction"> >name="default"> >name="start">/pages/generals/Logon.jsp > > > class="com.dztalk.client.webflow.struts.pojos.RegistAction"> >name="default"> >name="start">/pages/generals/Regist.jsp > > > > > urlA:"http://localhost:8080/dztalk-webflow/Regist!start.action"; > --- > works fine > urlB:"http://localhost:8080/dztalk-webflow/Logon!start.action"; > --- > failed > > exception trace below > > Could not find action or result > No result defined for action > com.dztalk.client.webflow.struts.pojos.LoginAction > and result input - > action > > > [S]: i find urlA call dostart() method in "PlatformActionSupport" but > urlB not! > As struts doc, i think Logon&Regist in my conf are almost sameness > action defition with just different name. > why Logon doesn't > work in my way? can anyone do me a favor about this topic! > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Action can not redirect with extend pattern?
Hello, Most likely your logon action is failing validation and trys to find the "input" result (which doesn't exist). If you have action methods that should not be validated you have several options, including: - create method-specific (action alias specific) validations - exclude additional methods from the validation interceptor - restructure things a little bit to avoid the issue altogether (for instance, if you're executing the input() method validation won't be run) There are probably other solutions too that might be a better fit for your application. Dave --- TANG Xigen <[EMAIL PROTECTED]> wrote: > Hi All > > > I write a simple self "PlatformActionSupport" to let > it's children can > redirect to result "start" when url like > "*!start.action", but when i > test my code, i find some works fine, some doesn't! > > [ Father PlatformActionSupport ] > @SuppressWarnings("serial") > public abstract class PlatformActionSupport extends > ActionSupport { > > public String doStart() { > return "start"; > } > } > > [ ChildA loginAction extend PlatformActionSupport ] > @SuppressWarnings("serial") > public class LoginAction extends > PlatformActionSupport {} > > [ ChildB RegistAction extend PlatformActionSupport ] > @SuppressWarnings("serial") > public class RegistAction extends > PlatformActionSupport {} > > [ Struts.xml ] > >name="com.dztalk.client.webflow.struts.pojos" > extends="struts-default"> > > class="com.dztalk.client.webflow.struts.interceptors.LanguageFocusInterc > eptor"> > > >name="LanguageFocusInterceptor"> >name="defaultStack"> > > > > class="com.dztalk.client.webflow.struts.pojos.LoginAction"> >name="default"> >name="start">/pages/generals/Logon.jsp > > > class="com.dztalk.client.webflow.struts.pojos.RegistAction"> >name="default"> >name="start">/pages/generals/Regist.jsp > > > > > urlA:"http://localhost:8080/dztalk-webflow/Regist!start.action"; > --- > works fine > urlB:"http://localhost:8080/dztalk-webflow/Logon!start.action"; > --- > failed > > exception trace below > > Could not find action or result > No result defined for action > com.dztalk.client.webflow.struts.pojos.LoginAction > and result input - > action > > > [S]: i find urlA call dostart() method in > "PlatformActionSupport" but > urlB not! > As struts doc, i think Logon&Regist in my conf are > almost > sameness action defition with just different name. > why Logon doesn't > work in my way? can anyone do me a favor about this > topic! > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Action can not redirect with extend pattern?
Hi All I write a simple self "PlatformActionSupport" to let it's children can redirect to result "start" when url like "*!start.action", but when i test my code, i find some works fine, some doesn't! [ Father PlatformActionSupport ] @SuppressWarnings("serial") public abstract class PlatformActionSupport extends ActionSupport { public String doStart() { return "start"; } } [ ChildA loginAction extend PlatformActionSupport ] @SuppressWarnings("serial") public class LoginAction extends PlatformActionSupport {} [ ChildB RegistAction extend PlatformActionSupport ] @SuppressWarnings("serial") public class RegistAction extends PlatformActionSupport {} [ Struts.xml ] /pages/generals/Logon.jsp /pages/generals/Regist.jsp urlA:"http://localhost:8080/dztalk-webflow/Regist!start.action"; --- works fine urlB:"http://localhost:8080/dztalk-webflow/Logon!start.action"; --- failed exception trace below Could not find action or result No result defined for action com.dztalk.client.webflow.struts.pojos.LoginAction and result input - action [S]: i find urlA call dostart() method in "PlatformActionSupport" but urlB not! As struts doc, i think Logon&Regist in my conf are almost sameness action defition with just different name. why Logon doesn't work in my way? can anyone do me a favor about this topic!