Java Reference
In-Depth Information
Fig. 9.1
JSP error page output
3. Scroll down the list of settings to locate 'Show friendly HTTP error messages'.
4 . Un tick (!) this option and click on OK .
Your JSP error pages should work fi ne after this.
9.8
Using JSPs to Access Remote Databases
One very powerful and increasingly popular application of JSPs is to provide Web
access to databases. This can be done (via JDBC) in several ways:
￿ by placing the required Java statements into the JSP (producing an excessive
amount of Java code in the JSP);
￿
by defi ning custom action tags (not covered in this text);
￿
by employing JavaBeans (probably the best way).
Since JavaBeans are not covered until the next chapter, it is not appropriate to
describe the technique here. However, most of the latter part of the next chapter is
devoted to the use of JavaBeans within JSPs, with the accessing of databases being
used as the central vehicle for illustration.
Search WWH ::




Custom Search