Primefaces Problem when I activate security-Constrains

UI Components for JSF
Post Reply
harvy.bejarano
Posts: 2
Joined: 25 May 2011, 23:25

25 May 2011, 23:54

Hi, Everybody :D

I have this problem, i have an App JPA + JSF + Primefaces everything work fine until i active security-constraint
to protect the entire App, when i do this all my primefaces controls do not show any design.

What could be the problem?

here is a copy of the web.xml:


context-param
param-name : javax.faces.PROJECT_STAGE
<param-value: Development

servlet
servlet-name: Faces Servlet</servlet-name>
servlet-class: javax.faces.webapp.FacesServlet
load-on-startup:1

servlet-mapping
servlet-name: Faces Servlet
url-pattern:/ui/*


session-timeout:30
welcome-file: ui/index.xhtml

servlet
servlet-name:Resource Servlet
servlet-class:org.primefaces.resource.ResourceServlet
load-on-startup:1

servlet-mapping
servlet-name:Resource Servlet
url-pattern: /primefaces_resource/*



security-constraint
display-name:Constraint1

web-resource-collection
url-pattern:/ui/*
url-pattern:/*

auth-constraint
role-name:*


login-config
auth-method:FORM
form-login-page:/ui/Login.xhtml
<form-error-page>/ui/LogError.xhtml


security-role
role-name:*
Last edited by harvy.bejarano on 26 May 2011, 04:25, edited 1 time in total.

healeyb
Posts: 365
Joined: 07 Apr 2010, 16:05

26 May 2011, 01:21

Hi, clearly the security constraints are blocking loading the css,
can you edit your post and enclose your deployment descriptor within
code tags, it's hard to read as it is. I notice that you have a reference
to the ResourceServlet, I don't have this is my web.xml, I think a
different resource handler method is used now? I doubt this will be
any help but I'll look at the re-formatted code tomorrow.

Regards,
Brendan.

harvy.bejarano
Posts: 2
Joined: 25 May 2011, 23:25

27 May 2011, 03:55

Hi,

I've solved the problem changing the url-pattern of the security constrain to this one:
url-pattern: *.xhtml; now the primefaces controls work fine

thanks :D

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 55 guests