wood burning stoves 2.0*
The moose likes JSP and the fly likes setProperty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "setProperty" Watch "setProperty" New topic
Author

setProperty

Gustavo Armenta
Greenhorn

Joined: Jul 08, 2003
Posts: 3
When I use the custom tag
<jsp:setProperty name="bean" property="*" />
it works fine to load string values. What can I do in order to set Date values? What if I want an exception to happen if the value is not a Date valid type?


Gustavo Armenta<br />2002 SCJP 1.4<br />2006 SCWCD 1.4 and SCBCD 5<br />2007 SCDJWS, SCEA, and OCUP
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

Parse the string passed to the bean mutator as a date and throw an exception if the parse fails.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: setProperty