jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes  <s:fielderror/> is not display error mybrowser 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 " <s:fielderror/> is not display error mybrowser" Watch " <s:fielderror/> is not display error mybrowser" New topic

<s:fielderror/> is not display error mybrowser

Piraba Sivakadadcham

Joined: Nov 07, 2008
Posts: 6
Hi All;

Its my issue:

Validate method not working propely in struts2

Action class validate methos is:
public void validate(){
if(getUser().getUsername().length() == 0){
System.out.println("inside the error username error");
addActionMessage("User Name is required");

if(getUser().getPassword().length() == 0){
addActionMessage("Password is required");

if(getUser().getPassword().length() > 6){
addActionMessage( "Minimum passsword length is 6");

System.out.println("###########" + this.hasActionMessages());

In jsp

<div id="result">Submit form bellow.</div>
<s:form action="accountTypeAction" >

<s:textfield name="user.username" label="Email" required="true" />

<!-- <s:textfield name="confirmEmail" key="label.confirmmail" size="20" /> -->

<s:password name="user.password" label="Password" required="true"/>

<!-- <s:password name="cpassword" key="label.confirmpassword" /> -->

Please anybody help me soon please


[Thumbnail for error.JPG]

Consider Paul's rocket mass heater.
subject: <s:fielderror/> is not display error mybrowser
Similar Threads
Struts2 Issue with localization: Messages not picked up from properties file for forward actions.
Showing Hiding <s:div> tag in Struts2
How to retrive values from <s:select> tag which is populated with data from the database in struts2.
Validation error mesage is not display in browser
[struts2] rendering textfielderror