We have a JSF-Application running. Ever since the default landing page was defined as /pages/dashboard.xhtml
.
Shiro is catching the request, showing the login-page, and after successfull authentication, our servlet retrieves the stored request from shiro and forwards the user to that page.
So, every other kind of deeplink is possible ofc.
Now, we wanted to allow the user to define his default landing page. System is setup, if shiro does not provide a stored request, our application forwards the user to his defined landing-page.
(Other deeplinks still working ofc.)
If the user now calls https://example.com/app/login.xhtml
directly, he is forwarded to his custom landing page. (after login)
The only thing that is strange - and drives me crazy by now: If a user only requests https://example.com/app
- the first request hiting shiro is the link to the old dashboard again: https://example.com/app/pages/dashboard.xhtml
In the web.xml we mapped the servlet to *.xhtml
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
and defined the welcome-file-list as
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
where the file exists, and only contains
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Refresh" content="0; URL=login.xhtml">
</head>
</html>
It seems like the file is never invoked. When removing the redirect, calling https://example.com/app
immediately leads to https://example.com/app/login.xhtml
- but shiro logs an access-request to https://example.com/app/pages/dashboard.xhtml
, leading to a "stored request" then.
(Which we don't like, cause that szenario should use the users default landing page)
It's wildfly 8.1, I'm totally out of ideas where this "request" is triggered. (Obviously it's not a default page) - but it's the first request hitting our url-rewrite filter, so it musst happen before the application is invoked...
But where?