Setting Bean Properties Case 1:
Explicit Conversion & Assignment
<% 
double discountCode = 1.0;
try {
String discountString = 
request.getParameter("discountCode");
discountCode = 
Double.valueOf(discountString).doubleValue();
} catch(NumberFormatException nfe) {}
%>
<%   getDiscountCode expects a double   %>
name="entry" 
property="discountCode"
value="<%= discountCode %>"
/>
67
JSP
www.corewebprogramming.com
Case 2: Associating Individual 
Properties with Input Parameters
 id="entry" 
class="cwp.SaleEntry" />
name="entry"
property="itemID"
param="itemID"
/>
name="entry"
property="numItems"
param="numItems"
/>
name="entry"
property="discountCode"
param="discountCode"
/>
68
JSP
www.corewebprogramming.com
34




  

Home

About Services Network Support FAQ Order Contact
 

Java Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved