application錯(cuò)誤編號(hào)500 求解
<%@ page language="java" import="java.util.Enumeration"contentType="text/html; charset=utf-8"
? ? pageEncoding="utf-8"%>
<!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=utf-8">
<title>Insert title here</title>
</head>
<body>
<h1>application內(nèi)置參數(shù)</h1>
<%
application.setAttribute("city","北京");
application.setAttribute("postcode","10000");
application.setAttribute("email","boluo@162.com");
%>
所在誠(chéng)實(shí)地:<%=application.getAttribute("city") %><br>
application中屬性有<%
Enumeration attributes = application.getAttributeNames();
while (attributes.hasMoreElements())
{
out.println(attributes.nextElement());
}
%><br>
application引擎番號(hào):<%=application.getServerInfo()%><br>
</body>
</html>
2016-02-20
500代表服務(wù)端有錯(cuò)誤,先把work和workapp里面的工程刪除,然后重新發(fā)布一下試試。
2017-07-23
這種錯(cuò)誤我今天也遇到了,是因?yàn)閔tml標(biāo)簽屬性之間沒(méi)有空格。 你的jsp頁(yè)面第一行?import="java.util.Enumeration"contentType="text/html; charset=utf-8", import 和 contentType之間沒(méi)有空行。
2016-06-27
這方法我試過(guò)了沒(méi)用,我把jsp文件重新拷貝一份,再重新部署一下就可以了