日期:2014-05-17 浏览次数:20800 次
<servlet> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring/appServlet/servlet-context.xml </param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> </bean>
@RequestMapping(value="/trend/test", method=RequestMethod.GET) public String test(Model model) { // model.addAttribute("foo", "bar"); // model.addAttribute("fruit", "apple"); return "index"; }
<iframe width="100%" .... src="velocity/layout/header.vm"/>