*
The moose likes Struts and the fly likes Validation Issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Validation Issues" Watch "Validation Issues" New topic
Author

Validation Issues

Adeyemi Adeseye
Greenhorn

Joined: Jan 10, 2009
Posts: 27
Please i need someone to help fix this problem. here are my codes, but the page refuses to validate.

My action file



My Input page jsp




My Display JSP is a table that display what is being entered from the input page




My XML configuration file is below





While the code works and display once a correct input is being keyed in, the problem is that it does not validate the fields, can someone help resolve this problem.



SCJP 6.0 (83%)
Raza Mohd
Ranch Hand

Joined: Jan 20, 2010
Posts: 247

hi ...

your HelloWorld.jsp needs <s:actionerror/>

Regards.
Raza


Good luck!!
A small leak can sink a Gigantic ship.>
Adeyemi Adeseye
Greenhorn

Joined: Jan 10, 2009
Posts: 27
i added the action error, its still the same
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

<wild-guess>Can you try ValidatorType.FIELD instead of ValidatorType.SIMPLE</wild-guess>


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Adeyemi Adeseye
Greenhorn

Joined: Jan 10, 2009
Posts: 27
Still did not solve the problem
Adeyemi Adeseye
Greenhorn

Joined: Jan 10, 2009
Posts: 27
hi forum members, i ran this code on Jboss server and its running well, i was using glassfish earlier.

I changed my input page and structured it within a table, but everytime i click submit more than once, it validates more than once, i.e. if i click submit 3 times it validates three times and display the error message three times. i started experiencing this when i started using table. See below my new input file



 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Validation Issues
 
Similar Threads
STRUTS 2 ERROR
Struts 2 problem-actions cant find the result. WARNING: Could not find action or result
ArrayIndexOutOfBoundsException
How to validate using annotation
Struts 2 Fileupload problem