Strange page after adding Primefaces

Asked

Viewed 76 times

0

After adding Primefaces dependencies the project ignores my page /home.xhtml that is in xml and shows a url /javax.faces.resource/theme.css.xhtml?ln=primefaces-aristo every time I run the project.

Does anyone know how to solve?

  • What XML do you mean when you say "which is in xml"?

2 answers

1


I was able to solve the problem just by overriding the configure method of the spring-security Websecurityconfigureradapter class and leaving it so:

@Override
protected void configure(HttpSecurity http) throws Exception {
    http.csrf().disable();
    http
            .authorizeRequests()
            .antMatchers("/javax.faces.resource/**").permitAll() //Essa é alinha que faltava
            .anyRequest().authenticated()
            .and()
            .formLogin()
            .loginPage("/login.xhtml")
            .permitAll();
}

1

Check your web.xml, in my I’m setting index.xhml as the home page:

<welcome-file-list>
        <welcome-file>index.xhtml</welcome-file>
</welcome-file-list>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.