<%@ page import="java.util.*" %> <%@ page import="java.util.regex.*" %> <%@ page import="java.lang.*" %> <%@ page import="java.net.*" %> <%@ page import="java.text.SimpleDateFormat" %> <%@ page import="java.text.DateFormat" %> <%@ taglib uri="http://ajaxtags.org/tags/ajax" prefix="ajax" %> <%@ taglib uri="struts-html" prefix="html" %> <%@ taglib uri="struts-bean" prefix="bean" %> <%@ page import="com.easyinsurance.audi.GetCustomerDetails" %> <% String contextpath=request.getContextPath(); String datestr; String newCookieVal=""; String newWebCookieVal=""; String utm_campaign=request.getParameter("utm_campaign"); String manuSearchType=request.getParameter("manuSearchType"); if(utm_campaign==null) utm_campaign=""; //set cookies //check if cookie already set String cookieName = "easy_utm_campaign_val"; Cookie cookies [] = request.getCookies (); Cookie easyCookie = null; String cookieVal =""; if (cookies != null){ for (int i = 0; i < cookies.length; i++){ if (cookies [i].getName().equals (cookieName)){ easyCookie = cookies[i]; cookieVal=easyCookie.getValue(); break; } } } Pattern p = Pattern.compile("^[a-zA-z][a-zA-z0-9,_-]*"); Matcher m = p.matcher(utm_campaign.trim()); boolean matchFound = m.matches(); if(matchFound==true && utm_campaign.trim().length()>0){ if(cookieVal!=null && cookieVal.trim().length()>0){ newCookieVal=cookieVal+","+utm_campaign; }else{ newCookieVal=utm_campaign; } Cookie cookie = new Cookie (cookieName,newCookieVal); cookie.setMaxAge(30 * 24 * 60 * 60); response.addCookie(cookie); } //Cookie setting ends //Setting cookie for web referer tracking String webRefName=request.getHeader("Referer"); if(webRefName==null) webRefName=""; System.out.println("webRefName...."+webRefName); String HostNameVal=(String) application.getAttribute("HostNameVal"); System.out.println("HostNameVal..."+HostNameVal); String checkVal=webRefName; if(webRefName.length()>=37){ checkVal=webRefName.substring(0, 39); } System.out.println("checkVal...."+checkVal); if(webRefName.trim().length()>0 && !(checkVal.contains(HostNameVal))){ webRefName=webRefName.replaceAll(":", ""); webRefName=webRefName.replaceAll(" ", ""); webRefName=webRefName.replaceAll(",", "_"); webRefName=webRefName.replaceAll("\"", ""); webRefName=webRefName.replaceAll("\'", ""); String webCookieName = "web_refer_val"; String webCookieVal =""; Cookie webCookies [] = request.getCookies (); Cookie easyWebCookie = null; if (webCookies != null){ for (int i = 0; i < webCookies.length; i++){ if (webCookies [i].getName().equals (webCookieName)){ easyWebCookie = webCookies[i]; webCookieVal=easyWebCookie.getValue(); break; } } } if(webCookieVal!=null && webCookieVal.trim().length()>0){ newWebCookieVal=webCookieVal+","+webRefName; }else{ newWebCookieVal=webRefName; } System.out.println("newWebCookieVal...."+newWebCookieVal+newCookieVal); Cookie webReferCookie = new Cookie (webCookieName,newWebCookieVal); webReferCookie.setMaxAge(30 * 24 * 60 * 60); response.addCookie(webReferCookie); //Cookie setting ends } DateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); Date date = Calendar.getInstance().getTime(); datestr = sdf.format(date); String setServerDateArr[]=datestr.split("/"); String setServerDate=setServerDateArr[0]; String setServerMonth=setServerDateArr[1]; String setServerYear=setServerDateArr[2]; %> <% String stateList=(String) application.getAttribute("stateList"); String stateCode=(String) request.getAttribute("stateCode"); String campaignCityVal=(String)request.getAttribute("rto"); String campaignmanuNameVal=(String)request.getAttribute("manufacturerName"); String campaignmodelNameVal=(String)request.getAttribute("modelName"); if(campaignCityVal==null)campaignCityVal=""; if(campaignmanuNameVal==null)campaignmanuNameVal=""; if(campaignmodelNameVal==null)campaignmodelNameVal=""; %>
 
RTO* :    
(Type atleast first 3 characters of the city to select your city from the list displayed (OR) Use "Search City" button)
Model* : Select Model
Vehicle CC * :
Manufacture Month & Year* :
Purchase Date* : Date Picker(DD/MM/YYYY)
Vehicle Owned By* : Individual Company
Enter your Name* : --Select-- Mr. Ms.

Email Id* :
Mobile No* :
or
Telephone No* :
State* : <%=stateList%>
Promotion Name :
(If you do not have any promotion code, please leave the field empty)
Type the characters as you see in the picture below*.

Letters are not case-sensitive

I have read the Terms & Conditions and agree to them