Google

Monday, October 30, 2006

The Best Practices of JSP

ktmvpnvThe emphasis on JSP best practices is simply because JSP pages seem to be more widely used because JSP technology promotes the separation of presentation from content. I Choose the right include mechanism: Static data such as headers, footers, and navigation bar content is best kept in separate files and not regenerated dynamically. Once such content is in separate files, they can be included in all pages using one of the following include mechanisms:
1. Include directive:
2. Include action:
The first include mechanism includes the content of the specified file while the JSP page is being converted to a servlet (translation phase), and the second include includes the response generated after the specified page is executed. I'd recommend using the include directive, which is fast in terms of performance, if the file doesn't change often; and use the include action for content that changes often or if the page to be included cannot be decided until the main page is executed.
Keep glued to this post for more articles on JSP.

0 Comments:

Post a Comment

<< Home