Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless loop in MultiViewHandler.normalizeRequestURI #5525

Open
pdudits opened this issue Nov 5, 2024 · 5 comments
Open

Endless loop in MultiViewHandler.normalizeRequestURI #5525

pdudits opened this issue Nov 5, 2024 · 5 comments

Comments

@pdudits
Copy link

pdudits commented Nov 5, 2024

Describe the bug

When FacesServlet is mapped to /* or invoked via forwarding where other servlet has this mapping, the view processing never terminates as it is stuck in while loop in MultiViewHandler.normalizeRequestURI. mapping is "" in this case and therefore loop condition is always true and the viewId never changes.

To Reproduce

Steps to reproduce the behavior:

  1. Set mapping of facesServlet to /*
  2. Make a request to a view
  3. Observe infinite loop

Expected behavior

Request processing should terminate. Given that /* is rare but valid entry, it shouldn't try any normalization

Additional context

Will provide PR for version 4, master is not buildable at this time.

@BalusC
Copy link
Contributor

BalusC commented Nov 16, 2024

Will provide PR for version 4

Your PR was for master not 4.0 so I closed it. Please recreate PR for 4.0.

master is not buildable at this time

Can you please be a bit more specific so we can fix this.

@pizzi80
Copy link
Contributor

pizzi80 commented Nov 22, 2024

master is not buildable at this time

Can you please be a bit more specific so we can fix this.

I think that "it's not buildable at this time" means that there is no
Jakarta Faces API v5.0 jar available on Maven

I've also had problems in the past trying to work on Mojarra v5
then I've decided to stay on my forked v4 version waiting
for better times

I've tons of PR to backport, but I need at least Java 17 (or 21 if possible)

@BalusC
Copy link
Contributor

BalusC commented Nov 22, 2024

I think that "it's not buildable at this time" means that there is no Jakarta Faces API v5.0 jar available on Maven

Just pull faces repo as well https://github.com/jakartaee/faces and then checkout 5.0 branch and then cd api and then mvn clean install from there to build the 5.0 snapshot into your local repo.

Then to use it in local maven projects, use following coords:

        <dependency>
            <groupId>jakarta.faces</groupId>
            <artifactId>jakarta.faces-api</artifactId>
            <version>5.0.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.mojarra</groupId>
            <artifactId>mojarra</artifactId>
            <version>5.0.0-SNAPSHOT</version>
        </dependency>

@pizzi80
Copy link
Contributor

pizzi80 commented Nov 22, 2024

Thanks again for your suggestions,
but it seems like a development only version

I would like to work on a real 5.0.0 version
that could be easily deployed with maven

Wich could be a release date for 5.0.0?

@BalusC
Copy link
Contributor

BalusC commented Nov 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants