In this section an Excel spreadsheet will be generated from the example database table. First, create a JSP application to generate an Excel spreadsheet. Right-click on the ApachePOI project node in the Applications Navigator and select New. In the New Gallery window select Web Tier | Java Server Pages. In the Items listed, select JSP Page and click on the OK button. In the Create JSP Wizard select a Web Application version and click on the Next button. In the JSP File window specify a file name and click on Next. Click on the Next window in the Tag Libraries window. Select the default options in the HTML Options page and click on the Next button. In the Finish window, click on Finish. A JSP gets added to the Apache POI project in the Applications-Navigator.
Add a resource reference for the JDBC data source jdbc/ApachePOIConnectionDS
, which was configured in the previous section, to the JSP web.xml
configuration file. Add a resource-ref
element to the web.xml...