application錯誤編號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內置參數</h1>
<%
application.setAttribute("city","北京");
application.setAttribute("postcode","10000");
application.setAttribute("email","[email protected]");
%>
所在誠實地:<%=application.getAttribute("city") %><br>
application中屬性有<%
Enumeration attributes = application.getAttributeNames();
while (attributes.hasMoreElements())
{
out.println(attributes.nextElement());
}
%><br>
application引擎番號:<%=application.getServerInfo()%><br>
</body>
</html>
2016-02-20
500代表服務端有錯誤,先把work和workapp里面的工程刪除,然后重新發布一下試試。
2017-07-23
這種錯誤我今天也遇到了,是因為html標簽屬性之間沒有空格。 你的jsp頁面第一行?import="java.util.Enumeration"contentType="text/html; charset=utf-8", import 和 contentType之間沒有空行。
2016-06-27
這方法我試過了沒用,我把jsp文件重新拷貝一份,再重新部署一下就可以了