Results 1 to 3 of 3

Thread: Static Resources Not Loading

  1. #1
    Join Date
    Oct 2011
    Posts
    2

    Unhappy Static Resources Not Loading

    Hi Team,

    1>I am new to Spring3.0 and I have configuration in my application context for loading static resources.
    <mvc:annotation-driven/>
    <mvc:resources mapping="/connectedHome/**" location="/connectedHome/" />
    <mvc:resources mapping="/images/**" location="/images/*" />

    2>In my jsp page i have like this to load images.
    a.<img alt="Not Avilable" src="webDir/connectedHome/Images/CardNumber.jpg">
    b.<img alt="Not Avilable" src="connectedHome/Images/CardNumber.jpg"><br />
    c.<img alt="Not Avilable" src="./connectedHome/Images/CardNumber.jpg"><br />
    d.<td><img alt="Not Available" src="images/btn_manage.gif"></td>
    e.<td><img alt="Not Available" src="./images/btn_manage.gif"></td>

    3>
    WARN] PageNotFound - -No mapping found for HTTP request with URI [/app-cust-selfservices/webDir/connectedHome/Images/CardNumber.j
    g] in DispatcherServlet with name 'spring-mvc'
    for a and for the remaining b,c,d,e i am not getting any warning but unable to see the images.



    Please help me to come out,


    Thanks in advance.


    Regards,
    Swamy K
    Analyst

  2. #2

    Default

    Worth trying to use jstl's c:url to rewrite the link for you on the off chance it's that.

    Code:
    <img alt="Not Avilable" src="<c:url value='/connectedHome/Images/CardNumber.jpg'/>">
    David

  3. #3
    Join Date
    Oct 2011
    Posts
    2

    Default I tried in that way also,but no luck.

    David

    Thanks for quick response.
    I tried in that way also,but no luck.Finally ressolved the issue by below approach i resolved the issue.


    Adding <mvc:default-servlet-handler /> in application context.

    Environment: Server is Weblogic10.XX
    JDK:6.0

Tags for this Thread

Posting Permissions

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