1 Reply Latest reply: Dec 6, 2011 2:22 AM by EJP RSS

    how to request a hidden field value on servlet with post method?


      i am trying to get a hiddenField value on servlet but i am getting a null value, how to solve this?

      my jsp code look like this:

      <form action="ImageResizeServlet" method="post">
      <input type="hidden" id="pageWidth" name="pWidth"></input>

      and my servlet code look like this:

      protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
      PrintWriter out = response.getWriter();
      try {
      String s=request.getParameter("pWidth");

      what to do?
      thank you.