Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Struts STRUTS2.0 Validation Errors
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Divya MV
STRUTS2.0 Validation Errors
1 Answer(s)      3 years and 9 months ago
Posted in : Struts


    <!DOCTYPE validators PUBLIC 

    "-//OpenSymphony Group//XWork Validator 1.0.2//EN" 

    "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">



    <validators>

<field name="username">

    <field-validator type="requiredstring">

        <param name="trim">true</param>

        <message>Login name is required</message>

    </field-validator>

</field>

<field name="password">

    <field-validator type="requiredstring">

        <param name="trim">true</param>

        <message>Password is required</message>

    </field-validator>

</field>

    </validators>

am using the above given LoginAction-validation.xml fro Login Action class.and the Login form is using the default theme.Validation is happening perfectly.

But the problem is even if i am enering the values the previous field errors persist in the page.

For eg:if i am not entering both username n password it ll show me 2 error messages saying "username is required" and "password is required".Next time even if i am enering the username the first message("username is required") is not getting removed.It still shows both the messages.Can you help me pls!


Advertisement
View Answers

February 5, 2011 at 4:55 PM


Please visit the following link:

Struts Tutorials



Related Tutorials/Questions & Answers:
STRUTS2.0 Validation Errors
STRUTS2.0 Validation Errors   <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN" "http... the previous field errors persist in the page. For eg:if i am not entering both
Struts2.0 - Struts
Struts2.0  Hi, How wrote separate Form (not in Action) so define bean tag in struts.xml ( struts2.0) how map dat bean to tag... plz any one help me... thanks& regards kalyani
Advertisements
New to struts2.0
New to struts2.0  hi am new to struts2.0 in my application i have declared a list in static how to get the static list values in my result.jsp??? if i remove the static in the list the result is getting displayed.why
errors
that what the errors in above code
Struts2.0 - Struts
Struts2.0  Hi , I am Kalyani, im very new to struts2.0 , just i fetch 1 recond im dao using SQL database , i want to display those in jsp for that i wrote following code... plz verify my plz,plz help me any one....plz
Error from struts2.0
Error from struts2.0  Hi All, I run the struts2.0 i get this error please give the solution. My versions jre,jdk,and jvm are 1.6. Tomcat 6.0. My error: The requested resource (/struts2-blank-2.0.6/) is not available. I
integrate hibernate and struts2.0 in eclips ide
integrate hibernate and struts2.0 in eclips ide  I want to know how to integrate hibernate with struts2.0 in eclips ide
struts 1.x and struts2.0 - Struts
struts 1.x and struts2.0  what are the differences between struts1.x version and struts2.0? Its urgent please reply soon..........  Hi friend, Struts1 extends the abstract base class by its action class
validation
validation  validation
check for errors
check for errors  How can I check for errors
validation
validation  we are doing payroll system project in java.So pls provide the complete validation code for employee master form
validation.....
validation.....  hi.......... thanks for ur reply for validation code. but i want a very simple code in java swings where user is allowed to enter only numerical values in textbox , if he enters string values then it should
validation
Validation method valid the in put. otherwise call the javascript onsubmit to check... code.Ok if you use struts then you can use Validation method valid the in put
What is the errors?
What is the errors?  ) while ( c <= 5 ) { product *= c; ++c;   if ( gender == 1 ) cout << "Woman" << endl; else; cout << "Man" << endl;   Post the whole code
Validation
); JLabel label=new JLabel("JTable validation Example",JLabel.CENTER); JPanel panel=new JPanel(); panel.add(scroll); JFrame frame=new JFrame("JTable validation
validation
validation  please help me to check validation for <form> <table class="form"> <tr> <td class="col1"> <label>Sno:</label> </td> <td
compilation errors
() { } } giving errors: 1) WelcomeServlet.java:37: ')' expected
Two forms submission to one Action Class in Struts2.0
Two forms submission to one Action Class in Struts2.0  Hi, I have two forms.I want to submit two forms with only one submit button to the same action, same method. How can i get this. Please reply me
types of errors in php
types of errors in php  What are the different types of errors in php
add cookies to login form in jsp by using struts2.0 framework
add cookies to login form in jsp by using struts2.0 framework  hi sir i implemented login.jsp page it include username and password field I used struts2.0 and hibernate3.0 and mysql database for login .jsp now i want to add
how to display default radio button in struts2.0 for first time login - Struts
how to display default radio button in struts2.0 for first time login  hi, this is suresh jampala, i have one question regarding struts2.0,how can i display default radio button in struts2.0 when ever i loggedin first time
Compiler errors in java
Compiler errors in java  Hi, I used GenerateRDF java file. Am getting errors when i run this code. I used command prompt only. getting errors as no package exist. i followed your instructions properly. Please help me out
Servlets errors in same page.
Servlets errors in same page.  How do I display errors list in the same page where a form field exists using servlets...........i.e. without using JSP? Please explain with a simple username password program
selectoptions errors in java script
selectoptions errors in java script  hi, in my web page when I select the color of the image it displays that particular color but when i again opt the select option it displays errors message. How do I rectify this problem
The errors tag
In this section, you will learn about the errors tag of the Spring form tag library
jsp errors - JSP-Servlet
jsp errors  Hi I got errors when running a jsp file I am giving the file. this is from rose india. I set the class path for 3 jar files i.e.... Now i am getting less errors compared to previous. But I am getting 2 errors
Struts validation
validation rules,put the plugins inside strutsconfig.xml, put the html:errors tag...Struts validation  I want to put validation rules on my project.But after following all the rules I can't find the result. I have extended
Java Program Errors
Java Program Errors  These are the 2 errors which I am getting when executing the java source code extracted from executable jar file The project was not built since its build path is incomplete. Cannot find the class file
Correct errors - Java Beginners
Correct errors  Identify and correct the errors in the following program: public java Method { public static method1(int n, m) { n += m; xMethod(3. 4); } public static int xMethod(int n) { if (n > 0) return 1
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?
WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP?  WHAT ARE THE DIFFERENT TYPES OF ERRORS IN PHP
Advertisements
 

 

 

DMCA.com