Dennis Mariano
Dennis Mariano

Reputation: 31

Spring Security with PrimeFaces Dialog Framework

I have a web Project which uses Spring security and Primefaces.

I am trying to use Primefaces Dialog Framework to call any XHTML File as a dialog .. my problem is when I add this line on my web.xml:

<filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

The dialog Box doesn't appear , if I remove the line above , the dialog box is being displayed .. but If I remove the lines above , I loose the spring security feature .. any configuration I missed?

Upvotes: 0

Views: 563

Answers (1)

alvarez
alvarez

Reputation: 476

Yes, Spring Security is blocking the frame generated by Primefaces. You can make it work by adding the following directive to Spring Security configuration

http // ... .headers().frameOptions().sameOrigin();

source: http://docs.spring.io/spring-security/site/docs/current/reference/html/headers.html#headers-frame-options

Upvotes: 2

Related Questions