Primefaces Ajax Fails with 404 error code

440 views Asked by At

I realized the ajax requests primefaces is making behind the scene, e.g. paging,wizard form, is failing. And when i check i console i see there's 404 error because the url used in making the request is not what is mapped by the controller.

See image

jquery.js.xhtml?ln=primefaces&v=6.0:25 POST http://localhost:8080/kenko-web/WEB-INF/views/patientData/patients.xhtml 404 ()

Here's my app config

@Bean
public ViewResolver viewResolver() {
    InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
    viewResolver.setViewClass(JstlView.class);
    viewResolver.setPrefix("/WEB-INF/views/");
    viewResolver.setSuffix(".xhtml");

    return viewResolver;
}

@Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
    configurer.enable();
}

@Bean
public static PropertySourcesPlaceholderConfigurer propertyConfigInDev() {
    return new PropertySourcesPlaceholderConfigurer();
}

There's already a question here but there's no answer

Anybody familiar with this and can help?

0

There are 0 answers