Includes Revisited

You may want to include the Calendar's output in another page. After all, the Calendar plays a supporting role in the Auction site, and you wouldn't want it to hog an entire page.

The Calendar's output can be included into another JSP's contents using the include tag introduced earlier. Before you do this, you will need to modify the JSP so that the contents can fit into a smaller area. You will need to do the following to achieve that:

  • Strip all HTML tags from the JSP except the ones within the body tag. Because you will be including the JSP's content into another page, you cannot output the <html>, <head>, and <body> tags to a page that already has them.

  • Use shortened day names, such as Sun and Mon instead of Sunday and Monday. ...

Get Java Server Pages from scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.