Dear denis
i've attached the struts.xml file with this email
the problem is when i dont input any information
the system doesnt stop immediatly at LoginAction-validation.xml file but
also implement LoginAction.java file
thus the system check everything even it is not necessary
it might make the system slower
thank you very much
2009/11/30 Denis Cabasson <[email protected]>
> Everything seems to be looking good.
>
> Is your validation xml file in the same package as your action? Are you
> using the defaultStack interceptor stack?
>
> If you leave txtName or txtPass empty, are you still proceeding to
> C0002_Home.jsp?
>
> Something must not be in place, because your example seems simple enough
> and definitely should be working. I tried at my place, and everything's
> working fine, so you must have some misconfiguration somewhere.
>
> Can you share more of your code? What is your complete struts.xml?
>
> Good luck!
>
> Denis.
>
> Nguyen Xuan Son a écrit :
>
>> I think i have it. here is the detail
>>
>> <action name="login" class="com.baibai.action.LoginAction">
>> <result name="success">C0002_Home.jsp</result>
>> <result name="input">login.jsp</result>
>> </action>
>>
>> Here is the HTML tag for the submit button
>> <input type="image" alt="Login" border="0" src="images/login_btn_arr.gif"
>> width="26" height="26" style="cursor:hand">
>>
>> Please tell me what should i correct?
>> thank you very much
>>
>> 2009/11/30 Denis Cabasson <[email protected] <mailto:
>> [email protected]>>
>>
>>
>> Do you have a result named "input" tied to your LoginAction? What
>> is it?
>>
>> Denis.
>>
>> Nguyen Xuan Son a écrit :
>>
>> Dear all
>> I have these in the LoginAction-validation.xml file
>> <validators>
>> <field name="txtName">
>> <field-validator type="requiredstring">
>> <param name="trim">false</param>
>> <message>error</message>
>> </field-validator>
>> </field>
>> <field name="txtPass">
>> <field-validator type="requiredstring">
>> <param name="trim">false</param>
>> <message>error</message>
>> </field-validator>
>> </field>
>> </validators>
>>
>> but it seems that even there is a error it still continue to
>> implement the
>> LoginAction.java file
>> what should i do if i want it stop implementing the
>> LoginAction.java
>> whenever there is any error appear
>> thank you very much
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> <mailto:[email protected]>
>>
>> For additional commands, e-mail: [email protected]
>> <mailto:[email protected]>
>>
>>
>>
>>
>>
>> --
>> =======================================================================
>> Ritsumeikan University, Asia JinZai Project
>> Master of Information Science
>> Nguyen Xuan Son
>>
>> Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
>> ShiteiHaimu Rien, Room 103
>> Tel/Fax : 81-(0)90-3976 2246
>> Email : [email protected] <mailto:[email protected]>
>>
>> Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
>> =======================================================================
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
=======================================================================
Ritsumeikan University, Asia JinZai Project
Master of Information Science
Nguyen Xuan Son
Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu
Rien, Room 103
Tel/Fax : 81-(0)90-3976 2246
Email : [email protected]
Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
=======================================================================
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="struts2" extends="struts-default">
<action name="login" class="com.baibai.action.LoginAction">
<result name="success">C0002_Home.jsp</result>
<result name="input">login.jsp</result>
</action>
<action name="logout" class="com.baibai.action.LogoutAction">
<result name="success">login.jsp</result>
<result name="input">logout.jsp</result>
</action>
<action name="SessionCheck" class="com.baibai.action.SessionCheckAction">
<result name="input">sessionChk.jsp</result>
</action>
<action name="C0002_Home" class="com.baibai.action.C0002_HomeAction">
<result name="input">C0002_Home.jsp</result>
</action>
<action name="C0003_ChangePassword" class="com.baibai.action.C0003_ChangePasswordAction">
<result name="success">C0002_Home.jsp</result>
<result name="input">C0003_ChangePassword.jsp</result>
</action>
</package>
</struts>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]