Thread: passing values

    #1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0

    Arrow passing values


    hi
    is it possible to pass values from one page to another without using a form? If so can someone give me an example of the code.
    thanks.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    Vicksburg, MS
    Posts
    7
    Rep Power
    0
    you could set a session attribute in the first jsp page:

    String email= "someone@yahoo.com";
    session.setAttribute("email", email);

    and then read it again in the next jsp page:

    String email= (String) session.getAttribute("email");

    or

    in the first jsp page set a hidden parameter:

    <input type="hidden" name="email" value="someone@yahoo.com">

    and then read it again in the next jsp page:

    String email =request.getParameter("email");
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    21
    Rep Power
    0
    Great, thanks for your help.

IMN logo majestic logo threadwatch logo seochat tools logo