aspose file tools*
The moose likes Struts and the fly likes how to show the duplicate value. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to show the duplicate value." Watch "how to show the duplicate value." New topic
Author

how to show the duplicate value.

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 301
Hi,

i am using strut2.

In my DAO class i use the following code

workorder.setStrErrMessage("Work order No already exixts !");


I want to display the value of strErrMessage in jsp page.if its exits

and in jsp i did like this.

<s:if test="strErrMessage != null && strErrMessage.size > 0 " >
<s:property value="strErrMessage" />


</s:if>


Can any body tell me how to do this.






Thanks
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

What is this workorder that you are adding the message to?? I think you should once take a look at this tutorial...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If the strErrMessage isn't an action property then you can't access it like it is--if the *workorder* is an action property then you'd refer to the property as workorder.strErrMessage.

Whether or not this is the "Struts 2" way to do error reporting really depends on what exactly you're trying to do.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to show the duplicate value.