错误代码:
Common.jsp
<%@ page contentType="text/html;charset=gb2312" %><%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.text.*"%>
<%@ page import="javax.servlet.*"%>
<%@ page import="javax.servlet.http.*"%>
<%
String title = "数据结构在线考试系统";
%>
index.jsp
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="incoming/Common.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<title><%=title%></title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
</head>
<body>
<%@ include file="Header.jsp"%>
</jsp:include>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="120" valign="top" background="images/in_left_bg.gif"><%@ include file="Left.jsp"%></td>
<td width="660" align="center"><p><font class="title2">欢迎进入数据结构在线考试系统</font></p>
<p> </p></td>
</tr>
</table>
<%@ include file="Footer.jsp"%>
</body>
</html>
foot.jsp
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="incoming/Common.jsp"%>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="780" height="70" background="images/bottom_arc_in2.gif" bgcolor="#F1F1F1"></td>
</tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="197" height="72"> </td>
<td width="386"><div align="center"><span class="txt"><span class="black"><%=title%>
</span></span></div></td>
<td width="197"> </td>
</tr>
</table>总说局部变量title重复,应该怎么改啊
Common.jsp
<%@ page contentType="text/html;charset=gb2312" %><%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.text.*"%>
<%@ page import="javax.servlet.*"%>
<%@ page import="javax.servlet.http.*"%>
<%
String title = "数据结构在线考试系统";
%>
index.jsp
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="incoming/Common.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<title><%=title%></title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
</head>
<body>
<%@ include file="Header.jsp"%>
</jsp:include>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="120" valign="top" background="images/in_left_bg.gif"><%@ include file="Left.jsp"%></td>
<td width="660" align="center"><p><font class="title2">欢迎进入数据结构在线考试系统</font></p>
<p> </p></td>
</tr>
</table>
<%@ include file="Footer.jsp"%>
</body>
</html>
foot.jsp
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="incoming/Common.jsp"%>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="780" height="70" background="images/bottom_arc_in2.gif" bgcolor="#F1F1F1"></td>
</tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="197" height="72"> </td>
<td width="386"><div align="center"><span class="txt"><span class="black"><%=title%>
</span></span></div></td>
<td width="197"> </td>
</tr>
</table>总说局部变量title重复,应该怎么改啊
解决方案 »
- java Web Service启动服务器出错(来者给分)
- myeclipse + struts + hibernate 连接oracle9i的 怪问题??
- 如何解析项目
- 请问如何将一个文件(eg:word)插入数据库的一个字段?帮帮忙~~
- request.setCharacterEncoding("gb2312")怎么用
- 急!!关于在web中显示动态统计图的问题!
- JDBC怎么获取Oracle里面的Date类型的值 。。
- 在IE中调用server上的一个servlet,没有任何反应,也不报错!急!在线等待!
- tomcat下 import class的问题
- 启动tomcat是出现如下问题,大神们帮帮忙
- 我的第一个基于 Yahoo! YUI Compressor 压缩算法的 JS,CSS 压缩器发布啦,欢迎下载使用。
- MyEclipse中集成Tomcat的出现的问题
是把页面引进来,而jsp:include是把效果引进来 ,你说区别是什么?你已经有了一个<%=title%>你再引进一个?另外,给你个忠告:不要在jsp中写伪代码...