I wanted to use html
page instead of using jsp
page. But while using html page I am getting error. But if I use jsp page i don't get any error.
When I use <property name="suffix" value=".jsp"/>
I don't get any error. Here my spring-servlet.xml
file
http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven/> <context:component-scan base-package="org.avijit"/> <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".html"/> </bean>
My Controller
class is
package org.avijit; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public class BaseController { @RequestMapping(value="/", method = RequestMethod.GET) public String homePage() { return "welcomePage"; } }
welcomePage.html
? – xingbin