JavaServer Page

October 23, 2006

610 CHAPTER 15 USING STRUTS, XDOCLET, AND

Filed under: JavaServer Page — webmaster @ 4:13 am

612 CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER TOOLS ApplicationResources.properties file is an easier way to internationalize your application, because then all language changes are available in one file. Earlier we mentioned that CSS stylesheets can be used to greatly improve your layout flexibility. We ve worked on many projects where we used different stylesheets for different pages or even for different users. There are two approaches that we ve used to switch stylesheets, the first being on a page basis, and the second for users. The first uses Tiles definitions to set the stylesheet for any given page. While you re at it, you might as well add this same feature for including JavaScript files. First of all, you can add the files you want to include in your baseLayout definition:


Then in the baseLayout.jsp file you can use Tiles tags and the JSTL to get these attributes and render them as follows: < %-- Get JavaScript List --%> < %-- Get List of Stylesheets --%>
” />
We had to add the scriptlet < %=request.getContextPath()%> since the addvalue inside a putList only renders the literal value. We didn t want to hard-code the contextPath in the

Note: If you are looking for good and high quality web space to host and run your jsp application check Lunarwebhost jsp web hosting services

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Powered by Java Web Hosting