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 <denis.cabas...@gmail.com <mailto:denis.cabas...@gmail.com>>

    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: user-unsubscr...@struts.apache.org
    <mailto:user-unsubscr...@struts.apache.org>
    For additional commands, e-mail: user-h...@struts.apache.org
    <mailto:user-h...@struts.apache.org>




--
=======================================================================
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    : nr000...@ed.ritsumei.ac.jp <mailto:nr000...@ed.ritsumei.ac.jp>
Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
=======================================================================


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

Reply via email to