Java Reference
In-Depth Information
session.setAttribute("addressBean", addressBean);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<form>
<ct:address addressType="home"/>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="width:65px;"></td>
<td>
<input type="submit" value="Submit"/>
</td>
</tr>
</table>
</form>
</body>
</html>
In the above JSP, we create an instance of our Address bean and set values for some
of its properties. We then set this bean as a session attribute, so that our custom tag
can pick it up from as before <jsp:useBean> tag. In the JSP markup, we have a JSP
form using our custom tag, plus an additional submit button.
 
Search WWH ::




Custom Search