Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 The Software Craftsman this week in the Agile 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]

Don't get me started about those stupid light bulbs.
subject: <s:fielderror/> is not display error mybrowser