Results 1 to 4 of 4

Thread: Need help with img

  1. #1
    Join Date
    Jan 2012
    Posts
    2

    Default 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. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,806

    Default

    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
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Jan 2012
    Posts
    2

    Default

    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

  4. #4
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,806

    Default

    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
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •