Results 1 to 1 of 1

Thread: 2 Dimensional JSP cookie exists? Confirmation and method please.

  1. #1
    Join Date
    Nov 2005

    2 Dimensional JSP cookie exists? Confirmation and method please.


    It would be great help if anyone could help me overcome a cookie problem. I have an ASP code which Iíd like to convert to JSP. The problem here is that ASP allows me to set 2 dimensional cookies, but I donít think JSP allows this. May I know any suggestions to the solution?

    ASP code:
    PHP Code:
    dim pageNameuserNamebmValidtemp

    temp Split(pagename,"=",-1)
    userName session("current")

    Response.cookies(userName)("page") = temp(0)
    Response.cookies(userName)("frame") = temp(1)
    Response.cookies(userName).Expires Now() + 30 
    JSP Code:

    PHP Code:
        String username session.getAttribute("Current").toString();
    String bookmark request.getParameter("bookmark");

    Date now = new Date();
    String timestamp now.toString();
    Cookie cookie = new Cookie (username,bookmark);
    cookie.setMaxAge(365 24 60 60);
    Last edited by invaz; 11-27-2005 at 09:57 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles