Reputation: 3838
I'm working on a website using both WaveMaker and Springsource MVC.
The entry generated by WaveMaker is named 'index.html'. I import all browser-side code into the /view directroy of an MVC project. And try to configure ContextLoadListener to map it into an uri. Using:
@RequestMapping(value = "/index", method = RequestMethod.GET)
public String testIndex() {
return "index.html";
}
Then I got the following error testing it:
SEVERE: PWC6117: File "C:\glassfish3\glassfish\domains\domain1\eclipseApps\TribblesDashboard\WEB-INF\views\index.html.jsp" not found
How do I fix it?
Upvotes: 0
Views: 11286
Reputation: 1468
This can be due to two reasons.
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/jsp/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
This indicates that the views should be placed in the WEB-INF/jsp
folders.
web.xml
. <servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
Check if the mappings are OK.
Upvotes: 2