<%@ page import="java.util.*" %> <%@ include file="shared/jsputils.jsp"%> <% String rAdMatch = "3"; boolean showAd = true; String cName = "ResIndexAd"; String cDelim = ":"; HashCookie c = HashCookie.findHashCookie(request.getCookies(), cName, cDelim.charAt(0)); String introR = ""; if(c != null){ introR = c.get("rintro"); }else{ c = new HashCookie(cName, cDelim.charAt(0)); } if(introR == null){ introR = ""; } if( !introR.equals(rAdMatch) ){ c.set("rintro", rAdMatch); c.setMaxAge(4800*60*60); c.setPath("/"); response.addCookie(c); }else{ showAd = false; } %> <% if( showAd ){ response.sendRedirect( "http://www.res.com/index-ad.html"); } else { //response.sendRedirect( "http://www.res.com/index.res.html"); response.sendRedirect( "http://www.res.com/index-ad.html"); } %>