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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:27:29+00:00 2026-06-17T12:27:29+00:00

I have am using JSF. When I am submitting a form – the data

  • 0

I have am using JSF. When I am submitting a form – the data from JSF tags (like h:inputText) are somehow passed in request to the server. I do not know how JSF rewrites it on request parameters or attributes (I not even that familiar with http request). I just know how to use ‘el’ langue. But now I have to add to a submit request a string, I a way that allow me read that string in a filter. So I want somehow use JSF tags (probably inputHidden) to set http request parameter with a fixed name (like “MySecretToken”), then In filter I could write:

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {

HttpServletRequest httpRequest = (HttpServletRequest) request;

if ( isTokenValid( httpRequest.getParameter("MySecretToken") ))
     doThis(...);
else
     doThat(...);

     chain.doFilter(request, response);
}

So the problem is “How use JSF tags (probably inputHidden) to set http request parameter with a fixed name?”.

  • 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-17T12:27:29+00:00Added an answer on June 17, 2026 at 12:27 pm

    Easiest way is to use the <f:param> in <h:commandXxx> component. It basically adds a HTTP request parameter with exactly the specified name and value.

    <h:commandButton ...>
        <f:param name="MySecretToken" value="#{bean.mySecretToken}" />
    </h:commandButton>
    

    A more JSF-ish way would be to create a custom component for the job. E.g. <my:token />. You could even create a custom component event listener which automagically adds this custom component to the form everytime.

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

Sidebar

Related Questions

I am using JSF 2.0 and I have text field as <h:form> <h:inputText value=#{myBean.myValue}
I am using JSF, I have an h:inputText text box, <h:form> Please enter your
I'd like to be able to make an Ajax call using JSF/Seam/RichFaces and have
I am using JSF 2.1 and ICEFaces 2 and I have a tabset like:
I have implemented a login form using JSF and PrimeFaces. I used this example
I have created a web application using JSF 2.0. I got feedback from my
I have some JSF-trouble using h:selectOneMenu with a list from my backend bean: My
I'm using JSF 2.1 with RichFaces 4 and I have a form with a
I am using JSF 1.1. I have a JSF page with a request scoped
I'm using JSF and RichFaces 4. I have a huge form which I have

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.