spring(3.0)での静的ファイルの設定
js,cssなどの外部ファイルを置くケース
このサンプルがベースなんだけど。
https://github.com/SpringSource/spring-mvc-showcase
src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml
servlet-context.xmlファイルにこんな感じで設定書いて
<resources mapping="/resources/**" location="/resources/" />
src/main/webapp/resources
こんな感じでおいてやればいい。
src |-- main | |-- java | | `-- org | | `-- springframework | `-- webapp | |-- WEB-INF | | |-- classes | | |-- spring | | | `-- appServlet | | `-- views | | |-- redirect | | `-- views | `-- resources | |-- jquery | | `-- 1.6 | |-- jqueryform | | `-- 2.8 | |-- jqueryui | | `-- 1.8 | | `-- themes | | `-- base | | `-- images | `-- messages