2 Replies Latest reply on Nov 21, 2003 12:26 PM by caranamoore

    Images and Stylesheet mappings

    caranamoore

      Hello all:

      How do I set up an images and stylesheet directory and create a mapping to these directories to use in jsp's? Is there something different I need to do when referencing the images and style sheet?

      I cannot seem to get my images or style sheet to display.

      Thanks in advance ~

        • 1. Re: Images and Stylesheet mappings
          jonlee

          It depends - if they are not in your WAR or context then you probably need to use absolute references. If they are in your context, use relative references. It is generally better to use relative references as it gives you flexibility to change context at deployment without breaking your web application.

          So if your JSP is at the top level directory for the WAR and the CSS is a level below at css/myapp.css you would refer to it from your JSP as:

          <link rel="stylesheet" href="css/myapp.css" type="text/css">


          • 2. Re: Images and Stylesheet mappings
            caranamoore

            jonlee - thank you for the reply. I will post what I come up with.