Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2514

Not able to display image when url-pattern is "/" in web.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Incomplete
    • 1.1.0
    • 1.1 Family
    • Core
    • None
    • Operating System: Windows XP
      Platform: Other
    • 35615

    Description

      In JSP i've used img tag like <img
      src="<%=request.getContextPath()%>/images/g_logo_rciworks.gif" width=208
      height=80 border=0 alt="">
      but not getting the image displayed on the UI when deploying with Struts
      Framework and getting
      "Jul 5, 2005 6:31:46 PM org.apache.struts.action.RequestProcessor processMapping
      SEVERE: Invalid path /images/g_logo_rciworks was requested" error on
      console.Though img properties shown the path as
      "http://localhost:7001/admin/images/g_logo_rciworks.gif" which is correct where
      "/admin" is my context-path.

      My web.xml mapping shows this..
      <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>/</url-pattern>
      </servlet-mapping>

      This is working fine when i changed the url-pattern to something else like "/xxx/*".

      Attachments

        Activity

          People

            Unassigned Unassigned
            nihar_pattanaik@mindtree.com Nihar Ranjan Pattanaik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: