I'm trying to redirect to a different page. I've tried this locally on my machine using jetty and the redirect works correctly. Now if I deploy the war file to tomcat and try to redirect the page I get this error.
HTTP Status 500 - File "/WEB-INF/jsp/.jsp" not found
javax.servlet.ServletException: File "/WEB-INF/jsp/.jsp" not found
org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:229)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:585)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
I'm not sure why its not putting the file name in "WEB-INF/jsp/.jsp".
Here is the java code that sends the redirect.
@RequestMapping(value="/surescriptstart", method=RequestMethod.POST)
public ModelAndView surescriptTes2t(SureScripts pro,HttpServletResponse response , HttpServletRequest request) throws IOException, ServletException{
if(verifySureScripts){
....
Message = "You are done!";
response.sendRedirect("done.html");
}else{
response.sendRedirect("surescriptstart.html");
}
....
Here is part of the servlet.xml
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>