title: External file (image, css, js) can not loaded in Struts2
body: <p>I want to ask why my external css/js was not load in my jsp.
  My struts.xml content :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE struts PUBLIC
   "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
    "http://struts.apache.org/dtds/struts-2.3.dtd"&gt;
  &lt;struts&gt;
  &lt;constant name="struts.enable.DynamicMethodInvocation" value="false" /&gt;
  &lt;constant name="struts.devMode" value="true" /&gt;
  &lt;constant name="struts.action.extension" value=""/&gt; 
  
  &lt;package name="default" namespace="/" extends="struts-default"&gt;
  
      &lt;default-action-ref name="home" /&gt;
  
      &lt;action name="home"&gt;
          &lt;result name="success"&gt;index.jsp&lt;/result&gt;
      &lt;/action&gt;
  
  &lt;/package&gt;  
  
  &lt;/struts&gt;
  </code></pre>
  
  <p>My web.xml content :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
         http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5"&gt;
  
  &lt;display-name&gt;Test&lt;/display-name&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;classpath:applicationContext.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt; 
  
  &lt;filter&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  
  &lt;error-page&gt;
      &lt;error-code&gt;404&lt;/error-code&gt;
      &lt;location&gt;error404.jsp&lt;/location&gt;
  &lt;/error-page&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I load my css in my jsp using this code</p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="../style/css/style.css"/&gt;
  </code></pre>
  
  <p>I also try use this code</p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="&lt;s:url value="/style/css/style.css"/&gt;"/&gt;
  </code></pre>
  
  <p>even, it's get error when I want to display an image on my jsp</p>
  
  <pre><code>&lt;img src="&lt;s:url value="/style/images/icon/car.png"/&gt;" /&gt;
  </code></pre>
  
  <p>What wrong with this, whether cause of this code (web.xml)</p>
  
  <pre><code>&lt;filter-mapping&gt;
     &lt;filter-name&gt;struts2&lt;/filter-name&gt;
     &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>Thank you for your response.</p>