JSTL Java

//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
  
  
  
    ">
      
        
      
    
  
  
  
    
            style="border-collapse: collapse" bordercolor="#111111"
      width="33%" id="AutoNumber1">
        
          
            
              
                
                  Chat Login
                

              


            
          
          
            User ID
            
              " size="20" />
            
          
          
            
              
                                name="action" />
                
              


            
          
        
      
      

 


    
    


      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: 
            
            


            
          
        
        
          
            
          
        
        
          
            
            Message:
            
            
            
            
                        value="" />
            
            
          
        
      
    
  

           
       
JSTL-Chat-Cookie-JSTL-Redirect.zip( 855 k)