Weird behaviour with @URLMappings

Splash Forums PrettyFaces Users Weird behaviour with @URLMappings

This topic contains 1 reply, has 2 voices, and was last updated by  Christian Kaltepoth 8 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #19508



    I’m facing a weird behaviour using @URLMapping that I’ve never seen that with xml file.

    Sometimes when I run the URL: localhost:8080/project/aluno it goes to the viewId correctly, and sometimes I get a HTTP 404 (not found).

    What could it be?

    Below is my code:

    @URLMappings(mappings = {
    @URLMapping(id = "aluno", pattern = "/aluno", viewId = "/person/student/principal.xhtml"),
    @URLMapping(id = "alunoId", pattern = "/aluno/#{studentBean.personId}", viewId = "/person/student/principal.xhtml")
    public class StudentBean implements Serializable { ... }


    So you say if you access /project/aluno in your browser and press F5, it sometimes works and sometimes you get a 404? That’s really strange.

    Could you tell us more about your application structure (which container, JSF implementation & version, etc).

    As I already wrote on your other post, you are missing a scope for your bean. You should add something like @javax.enterprise.context.RequestScoped to it.

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.