在springmvc的配置文件中加入
<mvc:resources mapping="/javascript/**" location="/static_resources/javascript/" />
<mvc:resources mapping="/styles/**" location="/static_resources/css/" />
<mvc:resources mapping="/images/**" location="/static_resources/images/" />
<mvc:default-servlet-handler />