i have a basic setup using spring boot and joinfaces to use primefaces and bootsfaces in my application.
Using for example bootsfaces components and perform ajax calls works like a charm.
When i add a simple primefaces component which uses ajax, the call fails and i get the following exception:
Code: Select all
j.e.resource.webcontainer.jsf.context : java.lang.IllegalArgumentException: Unrecognized Content Type.
at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:283)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.createResponseWriter(FaceletViewHandlingStrategy.java:1160)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:438)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:194)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:151)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:126)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:223)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:671)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
Code: Select all
<h:form>
<p:commandButton value="Add" ajax="true" actionListener="#{pingResultBean.onAction}" />
</h:form>
Clicking the button will raise the descriped exception
I have Spring security enabled and using following configuration:
Code: Select all
http
.authorizeRequests()
.antMatchers("/login*").permitAll()
.antMatchers("/logout*").permitAll()
.antMatchers("/js/**").permitAll()
.antMatchers("/css/**").permitAll()
.antMatchers("/javax.faces.resource/**").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login.xhtml")
.defaultSuccessUrl("/index.xhtml")
.failureUrl("/login.xhtml?error=1")
.and()
.csrf().disable()
.logout().logoutSuccessUrl("/login.xhtml?logout");
Would be nice if someone can help me.