• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to show the duplicate value.

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic