1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

sending textbox info from one page to another

Discussion in 'JSP' started by tefbaez, Jul 25, 2008.

  1. tefbaez

    tefbaez New Member

    Joined:
    Jul 25, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hey there, I need help with something... I need to create 2 .jsp pages, one with a textbox in which you submit a name, and the second one should display it when you i click the submit button...but i cant seem to get it right =S

    this is what ive got on the first page

    <html>
    <body>
    <form name="pagina" method="get" action="pagina2.jsp">
    Nombre:
    <input type="text" name="usuario">
    <input type="submit" value="submit">
    </form>
    </body>
    </html>

    Oh, i MUST use the get method, i was told to... so if anyone can guide me id very much appreciate it!
    tia.
     
  2. bitwords

    bitwords New Member

    Joined:
    Feb 19, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    Irrespective of whether you use get or post, you can get the values on next .jsp page using request.getparameter() and store it into the string:

    String txt = request.getParameter("usuario");

    Then you can simply print the string :).
     

Share This Page