java web jsp
请各位看看,这个程序哪错了<%@pagelanguage="java"import="java.sql.*"%><%@pagecontentType="text/html...
请各位看看,这个程序哪错了
<%@ page language="java" import="java.sql.*"%>
<%@ page contentType="text/html" pageEncoding="utf-8"%>
<%@ page import="java.util.*,java.io.*"%>
<html>
<head>
<title>header</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<%! int i=0;
private int count(){
i=i+1;
return i;
}%>
</head>
<body>
这个是全局变量值是:<%=count()%><br>
<%out.println("头文件输出成成功"); %>
<br>
尾部文件成功
</body>
</html>
<%@ page pageEncoding="utf-8"%>
<%@ include file="/header.jsp "%>
<% int j=0;
j=j+1; %>
局部变量:<%=j%>
<%@ include file="/footer.html" %>
头文件<%@ page language="java" import="java.sql.*"%>
<%@ page contentType="text/html" pageEncoding="utf-8"%>
<%@ page import="java.util.*,java.io.*"%>
<html>
<head>
<title>header</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<%! int i=0;
private int count(){
i=i+1;
return i;
}%>
</head>
<body>
这个是全局变量值是:<%=count()%><br>
<%out.println("头文件输出成成功"); %>
尾文件
<br>
尾部文件成功
</body>
</html>
中间的调用
<%@ page pageEncoding="utf-8"%>
<%@ include file="/header.jsp "%>
<% int j=0;
j=j+1; %>
局部变量:<%=j%>
<%@ include file="/footer.html" %> 展开
<%@ page language="java" import="java.sql.*"%>
<%@ page contentType="text/html" pageEncoding="utf-8"%>
<%@ page import="java.util.*,java.io.*"%>
<html>
<head>
<title>header</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<%! int i=0;
private int count(){
i=i+1;
return i;
}%>
</head>
<body>
这个是全局变量值是:<%=count()%><br>
<%out.println("头文件输出成成功"); %>
<br>
尾部文件成功
</body>
</html>
<%@ page pageEncoding="utf-8"%>
<%@ include file="/header.jsp "%>
<% int j=0;
j=j+1; %>
局部变量:<%=j%>
<%@ include file="/footer.html" %>
头文件<%@ page language="java" import="java.sql.*"%>
<%@ page contentType="text/html" pageEncoding="utf-8"%>
<%@ page import="java.util.*,java.io.*"%>
<html>
<head>
<title>header</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<%! int i=0;
private int count(){
i=i+1;
return i;
}%>
</head>
<body>
这个是全局变量值是:<%=count()%><br>
<%out.println("头文件输出成成功"); %>
尾文件
<br>
尾部文件成功
</body>
</html>
中间的调用
<%@ page pageEncoding="utf-8"%>
<%@ include file="/header.jsp "%>
<% int j=0;
j=j+1; %>
局部变量:<%=j%>
<%@ include file="/footer.html" %> 展开
4个回答
展开全部
<%! int i=0;
private int count(){
i=i+1;
return i;
}%>
把!去掉..
private int count(){
i=i+1;
return i;
}%>
把!去掉..
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
敢不敢不在页面写JAVA代码....看着揪心
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询