Announcement Announcement Module
Collapse
No announcement yet.
Static Resources Not Loading Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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

      Comment

      Working...
      X