I can not see the form.jsp page
I'm putting the following URL link
With this URL he only sees the hello-world.jsp page
I even put the following address link but it generates error, where am I going to be wrong.
here is my complete project;
part1;
public class ServletSpringMVC extends AbstractAnnotationConfigDispatcherServletInitializer{
@Override
protected Class<?>[] getRootConfigClasses() {
// TODO Auto-generated method stub
return null;
}
// esse pedaço do código informa qual pagina ira ser mapeada
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[]{AppWebConfiguration.class};
}
// esse código mapea o projeto
@Override
protected String[] getServletMappings() {
// TODO Auto-generated method stub
return new String[] {"/"};
}
part2;
@EnableWebMvc
@ComponentScan(basePackageClasses={HomeController.class})
public class AppWebConfiguration {
//esse pedaço do código informa aonde está a pagina dentro pacote especifico
@Bean
public InternalResourceViewResolver
internalResourceViewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
return resolver;
}
part3;
@Controller
public class HomeController {
@RequestMapping("/")
public String index(){
System.out.println("carregando produto");
return "hello-world";// essa é a pagina que está sendo visualizada
}