Hi,
I am working with WeblogicServer5.1.
my JSP can not set the cookie to the client
My JSP use MonMdaCookie Bean where I am using two methods:
one for computing cookie and the second to send them to the Client but it
's not work
Can someone help me?
this method would send the cookie to Client
public void writeCookie(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse,
String uid, String realm, String cargo)
throws IOException {
long ti = (new Date()).getTime()/1000;
file://ti=968761186;
Cookie cookie = new Cookie(cookieName, cookieName);
cookie.setValue(
computeCookieString(httpServletRequest.getRemoteAddr(),
uid,realm,cargo,ti,null));
cookie.setDomain(domain);
cookie.setComment("mailto:[EMAIL PROTECTED]");
cookie.setMaxAge(maxLifeTime);
cookie.setPath("/");
cookie.setSecure(secureCookie);
httpServletResponse.addCookie(cookie);
}
this is my jsp
.........
usr_realm=loginBean.getGroupe();
usr_id=loginBean.getUsername
MonMdaCookie c=new MonMdaCookie();
// on calcule le cookie corespondant%>
Moncookie=<%=c.computeCookieString(IP,usr_id,usr_realm,cargo,12334,null)%>
<%
// Ecriture cu cookie chez le client
c.writeCookie(request,response,usr_id,usr_realm
Thanks for help
Martin
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html