Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9059855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:04:40+00:00 2026-06-16T15:04:40+00:00

This web application works with Shiro and JSF. I added PrimeFaces and I am

  • 0

This web application works with Shiro and JSF. I added PrimeFaces and I am having login redirect issues.

Expected Behaviour:

  1. Navigate to url that needs authc
  2. Redirected to login page
  3. login redirected back to the original page

Behaviour with primfaces

  1. Navigate to url that needs authc
  2. Redirected to login page
  3. after login redirected to javax.faces.resource/theme.css?ln=primefaces-aristo

I login a user by catching the request params in my shiro.ini file

# name of request parameter with username; if not present filter assumes 'username'
authc.usernameParam = login:username
# name of request parameter with password; if not present filter assumes 'password'
authc.passwordParam = login:password
# does the user wish to be remembered?; if not present filter assumes 'rememberMe'
authc.rememberMeParam = login:remembered

I modified this to to instead use a PassThruAuthenticationFilter and the login request is processed by my Bean but this still produces the same error. Bean login method

AuthenticationToken token =  new UsernamePasswordToken(username, password);
Subject currentUser = SecurityUtils.getSubject();
currentUser.login(token);
ServletRequest request = (ServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
ServletResponse response = (ServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
WebUtils.redirectToSavedRequest(request, response, "index.xhtml");

My login Bean is @RequestScoped

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:04:41+00:00Added an answer on June 16, 2026 at 3:04 pm

    The root cause of this problem was having all my views in the same directory. I had configured shiro to require authentication for everything in the root directory /*

    The reason the login page was displayed is because it is a ‘special’ case, it is defined as the login page in the shiro config. After loading this page the browser made additional requests for the css and js files which is why there was no theme on this page.

    Given the behaviour of WebUtils.redirectToSavedRequest(request, response, "index.xhtml"); it appears that shiro simply saves the last request received that isn’t the login page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a Delphi function retrieving a web page from another application. This works
I have a PHP web application. This application works on Windows server, but it
At work we have a pretty large web application that works by having a
My applet run when I open my web application and works fine. Inside this
Today I added HtmlEditorExtender to my asp.net web application everything works fine but i
We've recently finished development of a web application that works as expected. When we
I have this web application using Spring Web Flow framework. In my main page
I want to do this web application I am creating in the best possible
In this case, I've developed a CSS code for this web application ..and sometimes
I have this situation: web application with cca 200 concurent requests (Threads) are in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.