jsf 2.0 and spring security 3

UI Components for JSF
Post Reply
ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

15 May 2010, 19:34

Hi,

since i'm using spring-security 3 in my applicatin for authentication, i can't use any jsf annotated jsf beans anymore. does anyone know why? i thought jsf is using his own EL -resolver.... but it seems that there are some problem. what do i have to configure, so that my primefaces components get the right values from my beans....


Greetings,
Ramo

ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

16 May 2010, 13:55

Hi,

okay i solved this Spring issue with defining a spring-config.xml file, where i defined, from which path to Spring should scan my classes for annotations, but i get another problem, while trying to define my own Validator with @FacesConfig.

My class starts with:

Code: Select all

@FacesValidator(value=EmailValidation.VALIDATOR_ID)
public class EmailValidation implements Validator, Serializable {

	public static final String VALIDATOR_ID = "com.globit.icoport.Email";
	private Pattern pattern;
	private Matcher matcher;
This validator isn't recognized... maybe the EL Resolver from spring can't validate it. I thought, that on a negative resolution from the spring EL, it will pass the "Annotation" to the JSF EL Resolver, but this seems not to work...

Any ideas?


Greetings,
Ramo

brunoaranda
Posts: 52
Joined: 17 Mar 2010, 12:40

17 May 2010, 13:28

If you are using MyFaces, set this context parameter in the web.xml:

Code: Select all

<context-param>
        <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>
        <param-value>com.yourdomain.yourapp</param-value>
    </context-param>
It will look for the JSF 2 annotations.

Cheers!
MyFaces 2.0.5 / PrimeFaces 3.0.M2-SNAPSHOT / JSP & EL 2.2 / Spring 3.0.5 / MyFaces Orchestra

ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

17 May 2010, 13:30

Hi,

i'm using the default Mojarre JSF 2 Annotations and Primefaces. Any idea, what i should set instead of your proposal?

Cheerio,
Ramo

brunoaranda
Posts: 52
Joined: 17 Mar 2010, 12:40

17 May 2010, 15:04

Unfortunately, I don't know how to do it in Mojarra. Maybe there is something similar to the MyFaces implementation?
MyFaces 2.0.5 / PrimeFaces 3.0.M2-SNAPSHOT / JSP & EL 2.2 / Spring 3.0.5 / MyFaces Orchestra

ramo.karahasan
Posts: 76
Joined: 18 Apr 2010, 23:57

17 May 2010, 15:05

Hi,

thank you for the hint. I'll do a search for it later on and give an answer if i found a solution.

Cheerio,
Ramo

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests