1 16 17 package org.apache.taglibs.request; 18 19 import java.util.*; 20 import javax.servlet.*; 21 import javax.servlet.http.*; 22 import javax.servlet.jsp.*; 23 import javax.servlet.jsp.tagext.*; 24 25 50 51 public class IsSessionFromCookieTag extends TagSupport 52 { 53 private boolean value = true; 54 55 60 public final int doStartTag() throws JspException 61 { 62 boolean result = ((HttpServletRequest)pageContext.getRequest()).isRequestedSessionIdFromCookie(); 63 64 if( value == result ) 65 return EVAL_BODY_INCLUDE; 66 67 return SKIP_BODY; 68 } 69 70 75 public final void setValue(boolean value) 76 { 77 this.value = value; 78 } 79 80 } 81 | Popular Tags |