//File: chat.jsp
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/core-rt" prefix="c-rt" %>
<%
Cookie mycookie = new Cookie("login",request.getParameter("uid"));
mycookie.setMaxAge(0x7ffffff);
response.addCookie(mycookie);
%>
Simple Chat with Cookie
">
Note: You may use any User ID you wish
//File: main.jsp
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
Chat Joined
value="${chat}${param.uid}:${param.text}
"
scope="application" />
User:
JSTL-Chat-Cookie-JSTL-Redirect.zip( 855 k)