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

<protected-views><url-pattern> does not work as per Servlet 12.1 and is compared against JSF view ID instead of request URL #1369

Closed
eclipse-faces-bot opened this issue Mar 18, 2015 · 4 comments

Comments

@eclipse-faces-bot
Copy link

Trigger: http://stackoverflow.com/q/29104597/157882

Problem 1: does not work as per Servlet 12.1. It does merely an exact match and wildcards are not supported. It's also nowhere in JSF 2.2 specification documented how exactly this should be used in faces-config.xml.

Problem 2: During generating action URL, is not compared against final action URL, but against JSF view ID, causing failures when there's a virtual URL based mapping like .faces or /faces/.

Another non-related problem 3: the current approach is inefficient. It's for every single view checked on a per-request basis while it could easily be (lazily) checked and stored in view/facelet metadata on an application wide basis.

Affected Versions

[2.2]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by @BalusC

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1369

@eclipse-faces-bot
Copy link
Author

@BalusC
Copy link
Member

BalusC commented Sep 13, 2024

This is actually as per spec: eclipse-ee4j/mojarra#5503

The cause of all this confusion/ambiguity is that view IDs of protected views are registered in faces-config.xml in entries named <url-pattern> instead of for example <view-id> and hereby unintentionally creating the impression that they need to represent URL patterns as defined in Servlet spec 12.1. But as per the Faces spec the value of the <url-pattern> entry must actually represent view ID not URL pattern.

@BalusC BalusC closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants