0

I need maintain old system with JDK/Java 1.6 , Apache Tomcat 6.0.x, Spring 2.5.6 . I am reading tutorial https://mkyong.com/spring-mvc/spring-mvc-jquery-autocomplete-example/

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans     
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:component-scan base-package="com.mkyong" />
    <bean
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix">
            <value>/WEB-INF/pages/</value>
        </property>
        <property name="suffix">
            <value>.jsp</value>
        </property>
    </bean> 
    <mvc:resources mapping="/resources/**" location="/resources/" />
    <mvc:annotation-driven />
</beans>

I focus at (this line of code for Spring 3.0, full source code https://1drv.ms/u/s!AhMAe-fS33VbhYw_5QZm9dwpwUTQnQ?e=sYcvYG )

<mvc:resources mapping="/resources/**" location="/resources/" />

and looking configuration for same purpose for Spring 2.5.6 .

enter image description here

I see at here http://www.springframework.org/schema/mvc/ , but not see what for Spring 2.5 . In Spring 2.5, how to config like tag <mvc:resources> in Spring MVC 3.0?

Vy Do
  • 46,709
  • 59
  • 215
  • 313

0 Answers0