I recently upgraded from Struts 2.0.x + SmartURLs to Struts 2.2.1 +
Convention plugin. However after upgrading all my static content is
no longer being served. I read all the release notes along the way
that I could find and nothing suggests that my old approach should
have stopped working. Can anyone point out what else I need to
change/tweak to get static content behaving again?
I'm using Maven as the build system.
static content is at
src/main/webapp/css
/javascript
/template
/WEB-INF
Here are my filters from web.xml
<filter>
<filter-name>struts-cleanup</filter-name>
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>org.apache.struts2.sitemesh.FreemarkerPageFilter</filter-class>
</filter>
<filter>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
</filter>
<filter>
<filter-name>struts</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts-cleanup</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Here's the root node and contents of the struts.xml:
<struts>
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.devMode" value="true" />
<constant name="struts.action.extension" value="" />
<constant name="struts.convention.default.parent.package"
value="cib-default" />
<package name="cib-default" extends="struts-default">
<interceptors>
<interceptor name="reattachment"
class="com.ballroomregistrar.compinabox.online.web.interceptors.WebSessionReattachmentInterceptor"
/>
<interceptor name="authentication"
class="com.ballroomregistrar.compinabox.online.web.interceptors.AuthenticationInterceptor"
/>
<interceptor name="authorization"
class="com.ballroomregistrar.compinabox.online.web.interceptors.AuthorizationInterceptor"
/>
<interceptor-stack name="cibStack">
<interceptor-ref name="reattachment" />
<interceptor-ref name="authentication" />
<interceptor-ref name="authorization" />
<interceptor-ref name="defaultStack" />
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="cibStack" />
<global-results>
<result name="login" type="redirect">/account/login</result>
<result name="access_denied" type="redirect">/accessDenied</result>
</global-results>
</package>
</struts>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]