CHAPTER 15 USING STRUTS, XDOCLET, AND OTHER TOOLS 613 definitions file, so this was a simple solution. If you re using JSP 2.1, you can replace the with ${variable}. You can also replace the
tag for the stylesheet with the more modern method of importing stylesheets, using @import. Using this syntax, the stylesheet import would look as follows: This technique can be used to decrease the amount of HTML written as well as to disable stylesheets for older browsers (that is, Netscape 4.x). This may sound foolish, but why would you want to disable stylesheets for older browsers? The reason is simple. If your site is developed using CSS and
elements for layout, the chances are that viewing your site without stylesheets is still readable, but it s just plain text, in black and white, with no fancy layout. This allows older browsers to still see your content, and you don t have to worry about making your CSS compatible with old browsers. Of course, this luxury is purely dependent on your customers. Our advice is to drop support for older browsers we guarantee that that alone will speed up your productivity. If you re willing to use a standards-compliant server (Java EE), why not expect a standards-compliant client? Surely most users have upgraded to newer browsers by now. BROWSERS AN ALTERNATE VIEW At least one author of this book, however, disagrees with the advice to arbitrarily drop support for older browsers. As of July 2005, 68% of web users were using Internet Explorer 6 (http://www.w3schools.com/ browsers/browsers_stats.asp). But looked at from another point of view, 32% of your potential users are using some browser other than Internet Explorer 6. And when Internet Explorer 7 is released, you can expect that many people will stay with version 6 for many months before upgrading. In addition to using older browsers, a great number of the users of your website may be using dial-up connections (41% according to http://www.websiteoptimization.com/bw/0506/). As W3Schools says on their website: Global averages may not always be relevant to your website. Different sites attract different audiences. Some websites attract professional developers using professional hardware, other sites attract hobbyists using older low spec computers. Part of your application design should be a consideration of the characteristics of the users of your site. If you determine that enough of them will be using bleeding edge technology, then your design decisions will be different from if you decide that many of them are older users with antiquated computers connecting through 56K dial-up modems. In the struts-resume application, we re using the
syntax so we can use a stylesheet switcher in the future. Paul Sowden developed the stylesheet switcher we ve implemented,
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