Java Reference
In-Depth Information
<FORM METHOD=GET ACTION="JDBC.jsp">
<INPUT TYPE="Submit" VALUE="Try again">
</FORM>
</BODY>
</HTML>
Figure 10.5 shows an example of the output from this JSP. (The specifi c error
message shown here resulted from removing the data source.)
Fig. 10.5 Error output from JDBC.jsp (via JDBCError.jsp )
10.6.3
Using HTML Tags to Manipulate a Bean's Properties
In addition to using JSPs for reading and displaying data via JavaBeans, it is
also possible to use them for manipulating bean properties directly (both read-
ing and writing). This is achieved by using action tags <jsp:getProperty>
and <jsp:setProperty>, which are used to 'get' and 'set' exposed bean
properties respectively. This is particularly useful for non-programmers. For the
<jsp:getProperty> tag, two attributes are required:
￿
name (specifying name of required bean);
￿
property (specifying name of property).
Search WWH ::




Custom Search