Results 1 to 2 of 2
  1. #1
    kattavijay's Avatar
    kattavijay is offline Member
    Join Date
    Jan 2009
    Location
    Hyderabad,india
    Posts
    21
    Rep Power
    0

    Default set an arry to the session

    hai all,
    can any one give me an idea how to set an array to the session, and how can get the values from another jsp?

    katta vijay

  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is online now Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    830
    Rep Power
    6

    Default

    U can set the array in session like this below:
    Ex Array int a[] = {1,2,3};
    HttpSession sessionObj = new HttpSession(true);
    sessionObj.setAttribute("arrayObj",a);

    Using session u can get the value from other jsp or using RequestDispatcher,url encoding etc

Similar Threads

  1. Replies: 1
    Last Post: 04-21-2009, 11:20 PM
  2. Replies: 1
    Last Post: 03-10-2009, 01:12 PM
  3. Session
    By mrvigneshmca in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-10-2009, 09:39 AM
  4. Replies: 2
    Last Post: 12-23-2008, 06:35 PM
  5. String and Arry Problem
    By farakhkhan@yahoo.com in forum New To Java
    Replies: 3
    Last Post: 03-31-2008, 10:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •