How to Link CSS to JSP

JavaServer Pages (JSP) are designed with users in mind, as you nearly always attempt to load information from your server instead of the visitor's Web browser. Cascading Style Sheets (CSS) are instrumental in the layout of a Web page. While much of a page's aesthetic value wouldn't be possible without the inclusion of sheets, the sheets place a lot strain on the visitor's Web browser. You can alleviate this problem by linking the CSS to your JSP, which will cause the sheets to be loaded from your site's server.

Instructions

    • 1

      Open the JSP file in the Web editing program of your choice.

    • 2

      Add a style block by typing "<style type="text/css">" into the header section of the code (between the <header> and </header> tags).

    • 3

      Type "%@include file="style.css" %" immediately after the style block placed in Step 2. Replace "style.css" with the file path of your CSS file.

    • 4

      Press the "Enter" key and type "</style>" to end the style block. You can then save and upload the changes to your website.

Related Searches:

References

Comments

Related Ads

Featured