User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 397,810 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,517 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1317 | Replies: 0
Reply
Join Date: Sep 2006
Posts: 65
Reputation: rpjanaka is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

Question how work <jsp:setProperty….> tag internaly

  #1  
Jan 29th, 2007
Hi all,

I want to use the <jsp:setProperty….> tag. When this is used it says that it calls to the setter methods and set the instance variables that submitted from a web page. (I suggest that it gets the instance fields from JSP request object and assign those).

But in my bean class there is a string field that should never be null. So to control this I tried to check it with in the setter method and assign an empty string if it is null.

public void setOpZone(String opZone) {
if(opZone == null){
opZone = “”;
}
this.opZone = opZone;
}


But still this is not working. The final result will shows the opZone field is null.

Why is this..???
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 6:24 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC