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

  • Home
  • SEARCH
  • 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 9265643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:07:23+00:00 2026-06-18T14:07:23+00:00

in my JavaEE-Application, I am using Apache Shiro[1] for user-authentication. My users are navigating

  • 0

in my JavaEE-Application, I am using Apache Shiro[1] for user-authentication.
My users are navigating via GET-URLs, as for example “/company/index.xhtml?companyId=327”.

I have enabled programmatic login, following a guide[2] from BalusC:

SavedRequest savedRequest = WebUtils.getAndClearSavedRequest(Faces.getRequest());

My problem is, that savedRequest.getRequestUrl() does not contain the previous mentioned GET-parameteres, when my case is asynchronous POST with or without RememberMe; just “/company/index.xhtml” is returned, for example. It seems as if “FacesAjaxAwareUserFilter” (see [2]) is not GET-params aware. Everything works fine on synchronous GET-calls.

How do I get the GET-parameters after an shiro-redirect because of authentication-needed in case of using “FacesAjaxAwareUserFilter”?

[1] https://shiro.apache.org/

[2] Followed this great article about JavaEE and Shiro: http://balusc.blogspot.de/2013/01/apache-shiro-is-it-ready-for-java-ee-6.html

  • 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-18T14:07:24+00:00Added an answer on June 18, 2026 at 2:07 pm

    JSF ajax requests are sent to the URL as generated by <h:form>. This is however by default not exactly the current URL including the query string, it’s by default the current URI without the query string.

    There are several ways to fix this. The simplest but ugliest way is to use JS:

    <h:form id="foo">
        ...
    </h:form>
    <script>document.getElementById("foo").action += "?" + location.search;</script>
    

    The cleanest way would be to create a custom ViewHandler whose getActionURL() (as used by <h:form>) will return the desired URL with the query string.

    JSF utility library OmniFaces has already such a component which does that based on view parameters: the <o:form> which basically extends the <h:form> with support for includeViewParams="true" (exactly the same way as <h:link> does).

    <f:metadata>
        <f:viewParam name="companyId" value="#{bean.company}" />
    </f:metadata>
    ...
    <o:form includeViewParams="true">
        ...
    </o:form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Apache Geronimo as my application server. And authentication is happening over LDAP
I'm currently developping a JavaEE application using glassfish, and I would like to save
I'm developing a JavaEE application and deploying it in Glassfish 3. I'm using Ubuntu
I'm using EclipseLink in Glassfish with my JavaEE application and have some java.util.Locale-columns in
I'm trying to use Apache Shiro (v1.2) in a JavaEE6 web application on a
I'm building my first web application using JavaEE. I'm using Netbeans 7 and Maven.
I´m doing a javaEE application and I´m using spring to inject my ejbs and
I've created a Java EE application using a set of libraries. Works like a
We are using a Java EE application and we are right now using Informix
I have built a web application using Java EE platform that sells one of

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.