title: i dont know how to store a cookie value in java and pass then to html page i will use wicket concept in websession here
body: <p>code in java page</p>
  
  <pre><code>protected void onSubmit() {
              System.out.println("login name inner the submit function:"+this.loginName);
  
          if(loginName == null || password == null) {
              logger.error("login failed - login name " + 
                      (loginName!=null ? "is set (trimmed length=" + 
                              loginName.trim().length()+")" : "is null") + 
                      " and password " + 
                      (password!=null ? "is set" : "is null") + ".");
              error(getLocalizer().getString("login.error", null));
              return;
          }
  
          User user = JtracApplication.get().authenticate(loginName, password);
          System.out.println("USER:"+user);
          if (user == null) {
              /*
               * ================================
               * Login failed!
               * ================================
               */
              logger.error("login failed - Authentication for login name '"+
                      loginName + "' not successful");
              error(getLocalizer().getString("login.error", null));
          } else {
              /*
               * ================================
               * Login success!
               * ================================
               */
  
              /*
               * Set Remember me cookie if checkbox is checked on page.
               */
              if(rememberMe) {
                  Cookie cookie = new Cookie("jtrac", loginName + ":" + JtracApplication.get().getJtrac().encodeClearText(password));
                  cookie.setMaxAge(30 * 24 * 60 * 60); // 30 days in seconds 
                  String path = getWebRequestCycle().getWebRequest().getHttpServletRequest().getContextPath();
                  cookie.setPath(path);
                  getWebRequestCycle().getWebResponse().addCookie(cookie);
                  logger.debug("remember me requested, cookie added, " + WebUtils.getDebugStringForCookie(cookie));
                  System.out.println("cookies:"+cookie);
                  temp=cookie;
              }
  
              /*
               * Setup session with principal
               */
              JtracSession.get().setUser(user);
  
              /*
               * Proceed to bookmarkable page or default dashboard
               */
              if (!continueToOriginalDestination()) {
                  setResponsePage(DashboardPage.class);
              }
          }
      } // end onSubmit()
  </code></pre>
  
  <p>i dnt know how to set the cookie value in a variable and pass it to my html page,,, plz help me as early as possible.. i will use websession concept... thats y i cant abl to retrive the session value in html page</p>