JSP出现错误 HTTP Status 500 - /index.jsp (line: 26, column: 46) quote symbol expected
在myeclipse环境下,出现"HTTPStatus500-/index.jsp(line:26,column:46)quotesymbolexpected"错误,我没...
在myeclipse环境下,出现"HTTP Status 500 - /index.jsp (line: 26, column: 46) quote symbol expected"错误,我没发现标点有问题啊!刷新后又会出现"
HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>jsp:include</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">
-->
</head>
<body bgcolor="white">
<font color="red">
当前的时间日期:<br>
<jsp:include page="date.jsp" flush="true"/>
<jsp:include page="information.jsp" flush="true">
<jsp:param name="name" value="Jack"/>
<jsp:param name="career" value="Teacher"/>
</jsp:include>
</font>
</body>
</html>
" 展开
HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>jsp:include</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">
-->
</head>
<body bgcolor="white">
<font color="red">
当前的时间日期:<br>
<jsp:include page="date.jsp" flush="true"/>
<jsp:include page="information.jsp" flush="true">
<jsp:param name="name" value="Jack"/>
<jsp:param name="career" value="Teacher"/>
</jsp:include>
</font>
</body>
</html>
" 展开
2个回答
展开全部
你应该知道基础知识的吧:jsp是不会发给浏览器的,web服务器(如tomcat)会把xxx.jsp解释成xxx_jsp.java,然后把这个java类编译成servlet(形成就是.class文件),然后对外服务。浏览器得到的是这个servlet返回给它的html字符串。
因此你这个错误是告诉你,jsp里有错误,而且是java代码的错误(因此无法编译)
我注意到你的这个里面include了好几个jsp文件,很可能是那些文件里有java代码错误。
因此你这个错误是告诉你,jsp里有错误,而且是java代码的错误(因此无法编译)
我注意到你的这个里面include了好几个jsp文件,很可能是那些文件里有java代码错误。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询