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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:08:22+00:00 2026-05-24T02:08:22+00:00

Is it possible to pass parameter from a JSP page to a JSF page’s

  • 0

Is it possible to pass parameter from a JSP page to a JSF page’s backing bean?

JSP page is popup window open when I invoke a button in JSF page and my selected value in JSP page, I should be able to pass to JSF’s backing bean.

P.S. When I add comment and I put @anyname when someone replies, @namyname part is getting truncated.

Update 1

To get the selected value from JSP to bean I did a crude approach.

I added the the following in JSP

String str = request.getParameter("selectname");

and assigned string str to a hidden field

 <input type="hidden" name="hid" value="<%=str%>"  /> 

and in my bean I am getting the value like the following

logger.info("jsp value "+FacesContext.getCurrentInstance().getExternalContext()
               .getRequestParameterMap().get("hid"));

This almost works except I always gets the value which I previously selects.
E.g. First time when I selects 1 and value returned in bean is null, second time when I selects 2, value returned is 1.

How could I get the currently selected value in my bean?

  • 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-24T02:08:22+00:00Added an answer on May 24, 2026 at 2:08 am

    First, if your JSF view technology is JSP, then you can use the <h:> tags in the jsp and it becomes straightforward 0 just add a <h:commandButton action="#{yourBean.yourMethod}" />

    Otherwise, you still can perhaps, but I’d suggest that you make your popup also a JSF page. JSF and JSP don’t coexist well. If you really must retain the situation, then you can try to emulate a JSF POST request to the target jsf URL.

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

Sidebar

Related Questions

To pass a hidden parameter from a JSF 2.0 Managed BEan action handler to
I am trying to pass a parameter from AJAX back to my JSP page.
Is it possible to pass an ArrayCollection object from flex ExternalInterface.call() as a parameter
I would like to know if it's possible to pass a parameter to a
Is it possible to pass a list constructor parameter when resolving a type? I
In Ruby, is it possible to pass by reference a parameter with value-type semantics
In VB.NET, it is entirely possible to pass an integer as a string parameter
Possible Duplicate: How do you pass a function as a parameter in C? Is
Is it possible to pass a function/callback from javascript to a java applet? For
How can I pass a parameter to a fabric task when calling fab from

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.