"" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "," "" "", "" ""/**
Requestmapping (value= "default_axis.jspx") public
String Setdefault_doctree (httpservletrequest request, HttpServletResponse response,httpsession session) {
Requestproxy proxy = requestproxy.fromrequest (request);
This sets the default tree
Cookie Defaultcookie = null;
String Defaultaxisid = Proxy.getchineseparameter ("Defaultaxisid");
if (! Stringutil.isempty (Defaultaxisid)) {
Tadminuser user = (Tadminuser) session.getattribute (global.session_user_ NAME);
if (user!= null) {
Defaultcookie = new Cookie (User.getid (). toString (), defaultaxisid);
Defaultcookie.setpath ("/");
Defaultcookie.setmaxage (365*24*24*60);
Response.addcookie (Defaultcookie);
}
return "redirect:doc_tree.jspx";
}
The name of the cookie can be a dynamic value.
Defaultcookie = new Cookie (User.getid (). toString (), defaultaxisid);
cookie[] cookies = request.getcookies ();
"" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "OldValue
list
String val = ""; "" "" "" "" Here is another way to store "" "" "" "" ""
if (oldvalue!=null &&!oldvalue.equals (")) {
val = oldValue +"; " + Hotelinfo.gethotel (). GETS_HOTELCD () + "*" +hotelinfo.gethotel (). Gets_hotel ();
val = Urlencoder.encode (val, "UTF-8");
} else{
val = Hotelinfo.gethotel (). GETS_HOTELCD () + "*" +hotelinfo.gethotel (). Gets_hotel ();
val = Urlencoder.encode (val, "UTF-8");
}
Cookie cookie = new Cookie ("Hotel_name_id_cookie", Val);
Cookie.setpath ("/");
Cookie.setmaxage (365 * * *);
Response.addcookie (cookie); Be sure to add, otherwise you can't read or null when you read it.
String val = "";
if (Oldvalue!=null &&!oldvalue.equals ("")) {
val = oldValue + ";" + Hotelinfo.gethotel (). GETS_HOTELCD () + "*" +hotelinfo.gethotel (). Gets_hotel ();
val = Urlencoder.encode (val, "UTF-8");
} else{
val = Hotelinfo.gethotel (). GETS_HOTELCD () + "*" +hotelinfo.gethotel (). Gets_hotel ();
val = Urlencoder.encode (val, "UTF-8");
}
Cookie cookie = new Cookie ("Hotel_name_id_cookie", Val);
Cookie.setpath ("/");
Cookie.setmaxage (365 * * *);
Response.addcookie (cookie); Be sure to add, otherwise you can't read or null when you read it.
The name of the cookie can be a dynamic value. The name of the cookie can be a dynamic value.