• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to show the duplicate value.

 
pankaj semwal
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9496
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is this workorder that you are adding the message to?? I think you should once take a look at this tutorial...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic