⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.jsp

📁 exemple for using session in jas and servlet
💻 JSP
字号:
<%String[] couleur={"990000","000000","C9D000","51930A","FFFFFF","00B4FF",}; String f="", p="", l="",t="",f1="", p1="";Cookie[] cookies = request.getCookies();for(int i=0; i<cookies.length; i++) {  Cookie cookie = cookies[i];  String nomCookie = cookie.getName();  if (nomCookie.equals("fond"))      {	  	f1=cookie.getValue();        if(f1.equals("rouge")) f=couleur[0];        if(f1.equals("Noir")) f=couleur[1];        if(f1.equals("Jaune")) f=couleur[2];        if(f1.equals("Vert")) f=couleur[3];        if(f1.equals("Blanc")) f=couleur[4];           if(f1.equals("Bleu")) f=couleur[5];                         }if (nomCookie.equals("police")){		p1=cookie.getValue(); 		if(p1.equals("rouge")) p=couleur[0];        if(p1.equals("Noir")) p=couleur[1];        if(p1.equals("Jaune")) p=couleur[2];        if(p1.equals("Vert")) p=couleur[3];        if(p1.equals("Blanc")) p=couleur[4];         if(p1.equals("Bleu")) p=couleur[5];           }     if (nomCookie.equals("livre")) l=cookie.getValue();     if (nomCookie.equals("taille")) t=cookie.getValue();                } %><%@ page language="java" contentType="text/html; charset=ISO-8859-1"    pageEncoding="ISO-8859-1"%>    <%@ page errorPage="erreur.jsp" %><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><style type="text/css"><!--#monForm{	width: 60%;}#monForm p{	margin: 2px 0;}/* fieldset , legend */#monForm fieldset{	margin-bottom: 10px;	border: #CCC 1px solid;        }#monForm fieldset:hover{	background-color: #FFF;}#monForm fieldset legend{	padding: 0 10px;	border-left: #CCC 1px solid;	border-right: #CCC 1px solid;	font-size: 1.2em;	color: #999;        }/* Label */#monForm label{	background-color: #FFCC66;	display: block;	width: 39%;	float: left;	padding-right: 1%;	text-align: right;	letter-spacing: 1px;}#monForm label:hover{	font-weight: bold;}#monForm .form_label_nostyle{	background: none;}/* Input */#monForm input, #monForm select{	margin-left: 1%;	width: 58%;	border: #CCC 1px solid;}#monForm input:hover, #monForm select:hover{	border: #999 1px solid;	background-color: #DDEEFF;}/* button submit */#monForm input[type="submit"]{	border: #DDEEFF 1px solid;	width: 27%;}#monForm input[type="submit"]:hover{	background-color: #66CC33;	cursor: pointer;}    --></style><title>Page des choix</title> <script language="javascript">    accepteCookies = (navigator.cookieEnabled) ? true : false;    if (accepteCookies==false) {    window.open("erreur.jsp");    }</script> </head><body bgcolor="<%=f %>"><h1 align="center">Bienvenue dans la page de vos choix</h1> <FONT color="<%=p %>"> <FONT size="<%=t%>"><%  if ((cookies == null) || (cookies.length == 0))       { }              else{       out.println("<h1>Vos choix pr閏閐ement s閘閏tionn閟 :</h1>");                   out.println("La couleur de fond est: ");                out.println(f1);                out.println("<br />");                             out.println("La couleur de police est: ");         out.println(p1);                 out.println("<br />");                         out.println("la taille de police est ");        out.println(t);                 out.println("<br />");      out.println("Votre type de livre prefer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -