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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:29:54+00:00 2026-06-08T07:29:54+00:00

I have an input in my jsf page like this <html:inputText id=ResponseOK value=#{bean.ResponseOK} binding=#{bean.ResponseOKInput}

  • 0

I have an input in my jsf page like this

<html:inputText id="ResponseOK" value="#{bean.ResponseOK}" binding="#{bean.ResponseOKInput}" /> 

I want to get the value in a servlet (by request.getParameter (“ResponseOK”)) when i click on a command button

<html:commandButton value="Valider" action="#{bean.callServlet}"/>

which call a function

public void callServlet()
    {
         String url = "http://localhost:8080/TestOne/Timers";  //servlet
            FacesContext context = FacesContext.getCurrentInstance();  
            try {  

               context.getExternalContext().redirect(url);  

            }catch (Exception e) {  
               e.printStackTrace();  
            }  
            finally{  
               context.responseComplete();  
            }  
    }

Unfortunately, in my servlet the variable Ok , return only null

protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {

        String Ok = request.getParameter("ResponseOK");// return null
        System.out.println(timerOk);
        }

thank you very much

  • 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-08T07:29:55+00:00Added an answer on June 8, 2026 at 7:29 am

    In order for you to be able to get a property from the request, the input must have the name attribute:

    <html:inputText id="ResponseOK" value="#{bean.ResponseOK}" binding="#{bean.ResponseOKInput}"  name="ResponseOK"/>
    

    UPDATE:

    I’m not too familiar with the JSF framework but i think your problem is the action button.

    This button is not a submit button so the value of the input is not being sent to the request.

    When calling a GET request, you need to pass the parameter in URL itself, so you need the url to look like:

    http://localhost:8080/TestOne/Timers?ResponseOK=value
    

    So you need to transfer the value of the ResponseOK input to the callServlet method.

    Hope that helps.

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

Sidebar

Related Questions

I have jsf page: .... <form jsfc=h:form action=> <h:dataTable value=#{newMusician.strings} var=preferredMusicGenre id=musicGenresSelectTable> <h:column> <h:inputText
I want to generate some html code for the jsf page I have (I
I have an inputText and a commandButton in a JSF page. The user inputs
I have this login.xhtml JSF page: <?xml version=1.0?> <jsp:root version=2.0 xmlns:jsp=http://java.sun.com/JSP/Page xmlns:f=http://java.sun.com/jsf/core xmlns:h=http://java.sun.com/jsf/html> <jsp:directive.page
I have an <input> field in my web page, and I want to add
I found that the backing bean value displayed on the JSF page will collapse
I want to convert my input into a timestamp value. I have only found
I have a JSF page which has a variable number inputText elements containing numeric
I want to validate the inputs to my JSF page inside my Managed bean,
I have a PrimeFaces checkbox on a JSF page that I'd like to check/uncheck

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.