Announcement Announcement Module
Collapse
No announcement yet.
Need help with img Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with img

    Hi everybody

    I have a little probleme with the display of a img

    here is my code

    <img src="/images/terre.jpg" width="512" height="300" alt="terre">

    My project folder is like this


    images
    __-->terre.jpg
    WebContent
    __-->WEB-INF
    _____-->jsp
    _______-->Index.jsp

    If i understood the thing right, i cant acces my images if the folder is in the WEB-INF, but i cant acces it like that either

    I use the last version of eclipse indigo ( 3.7 )

    Help please, i'm desperate

  • #2
    Hello

    If i understood the thing right, i cant acces my images if the folder is in the WEB-INF
    Yes you right.

    Be sure first you have re build it your application and then start the server, some times these new files are not detected

    The rest of the file (JSP) is load without problems? Labels, fields etc

    Comment


    • #3
      Hi

      I have rebuid my app , restart the server , and even reboot my computer , and nothing changed

      In my jsp i even have some jsp include for other jsp pages (header, footer, menu), and it works well , but my css script , and js script have the same problem than my img

      Comment


      • #4
        Hi

        I have rebuid my app , restart the server , and even reboot my computer , and nothing changed
        OK

        but my css script , and js script have the same problem than my img
        OK, it is not a Spring problem, In Google do a research about how to declare a reference of an image into a JSP.

        The problem is due the path references.

        I remember two ways to fix this, but I dont have my source code available.

        BTW in Spring Samples like petclinic if my memory doesnt fail me, it includes images of the pets

        HTH

        Comment

        Working...
        X