on 02-09-2009 2:38 AM
Hi experts,
Can anyone explain the session and cookie concept for me and guide me how to config the session or cookie in EP?
Thanks in advance.
Regards,
Chris gu
closed.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which cookie? There is a logon ticket, held as a cookie. There is a session cookie, which tells the Java dispatcher which server process to send a user to and if you're using SAP Web Dispatche there's a cookie which tells Web Dispatcher which Java dispatcher to use.
After that there could be application specific cookies...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used Google to find [this site|http://www.java2s.com/Tutorial/Java/0360__JSP/CreateCookie.htm] which included the following code:
<HTML>
<HEAD>
<TITLE>Reading a Cookie</TITLE>
</HEAD>
<BODY>
<H1>Reading a Cookie</H1>
<%
Cookie cookie1 = new Cookie("message", "Hello!");
cookie1.setMaxAge(24 * 60 * 60);
response.addCookie(cookie1);
%>
<P>refresh to see the Cookie</p>
<%
Cookie[] cookies = request.getCookies();
for(int i = 0; i < cookies.length; i++) {
if (cookies<i>.getName().equals("message")) {
out.println("The cookie says " + cookies<i>.getValue());
}
}
%>
</BODY>
</HTML>
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.