File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

how to show the duplicate value.

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 303

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" />


Can any body tell me how to do this.

Ankit Garg

Joined: Aug 03, 2008
Posts: 9463

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

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:
subject: how to show the duplicate value.
It's not a secret anymore!