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 695645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:58:51+00:00 2026-05-14T02:58:51+00:00

Can someone tell me how to catch parameters passed from URI in JSF’s managed

  • 0

Can someone tell me how to catch parameters passed from URI in JSF’s managed bean?
I have a navigation menu all nodes of which link to some navigation case. And i have two similar items there: Acquiring products and Issuing products. They have the same page but one different parameter: productType. I try to set it just by adding it to URL in “to-view-id” element like this:

<navigation-case>
    <from-outcome>acquiring|products</from-outcome>
    <to-view-id>/pages/products/list_products.jspx?productType=acquiring</to-view-id>
</navigation-case>

<navigation-case>
    <from-outcome>issuing|products</from-outcome>
    <to-view-id>/pages/products/list_products.jspx?productType=issuing</to-view-id>
</navigation-case>

But i can’t get this “productType” from my managed bean. I tried to get it through FacesContext like this:

FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("productType")

And like this:

HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
    request.getParameter("productType");

And i tried to include it as a parameter of managed bean in faces-config.xml and then getting it through ordinary setter:

 <managed-bean>
        <managed-bean-name>MbProducts</managed-bean-name>
        <managed-bean-class>my.package.product.MbProducts</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
     <managed-property>
         <property-name>productType</property-name>
         <value>#{param.productType}</value>
     </managed-property>
    </managed-bean>
...
public class MbProducts {
...
 public void setProductType(String productType) {
  this.productType = productType;
 }
...
}

But neither of these ways have helped me. All of them returned null. How can i get this productType? Or how can i pass it some other way?

  • 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-05-14T02:58:51+00:00Added an answer on May 14, 2026 at 2:58 am

    The navigation rule by default does a forward. I.e. it reuses the initial request. Whatever way you try to access the request parameters in the forwarded resource, it will always try to grab them from the initial and already-processed request.

    To fix this, you need to fire a redirect instead of forward. It creates a brand new request (you also see this reflecting back in the browser address bar).

    In JSF, adding

    <redirect/>
    

    to the navigation case should do.

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

Sidebar

Related Questions

Can someone tell me if its possible to create relative as opposed to absolute
Can someone tell me why this is not displaying the form? If I go
Can someone tell me how i can change the .xml file that a flash
Can someone tell me the different between LinkButton.PostBackUrl and HyperLink.NavigateUrl? I've got a asp.net
Can someone tell me how to change directories using FtpWebRequest? This seems like it
Can someone tell what is wrong with this query? sqltext = SELECT utyp, count(*)
Can someone tell me what the code equivelant in VB.Net to this C# code
Can someone tell me what exactly the two above lines of javascript do? And
Can someone tell me why this processes all the files and then does it
Can someone tell me why the following does not match: >>> re.search(r'(\d{2, 10})', '153')

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.