給我報服務器500,空指針異常.用eclipse是可以的,idea不行
<?xml?version="1.0"?encoding="UTF-8"??>
<!DOCTYPE?struts?PUBLIC
????????"-//Apache?Software?Foundation//DTD?Struts?Configuration?2.3//EN"
????????"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
????<package?name="p1"?extends="struts-default">
????????<action?name="hello"?class="com.org.web.action.Hello"?method="sayHello">
????????????<result?name="success">
????????????????/success.jsp
????????????</result>
????????</action>
????</package>
</struts><?xml?version="1.0"?encoding="UTF-8"?>
<web-app?xmlns="http://xmlns.jcp.org/xml/ns/javaee"
?????????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
?????????xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee?http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
?????????version="4.0">
????<filter>
????????<filter-name>struts2</filter-name>
????????<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
????</filter>
????<filter-mapping>
????????<filter-name>struts2</filter-name>
????????<url-pattern>/*</url-pattern>
????</filter-mapping>
</web-app><%--
??Created?by?IntelliJ?IDEA.
??User:?39738
??Date:?2018-07-09
??Time:?21:00
??To?change?this?template?use?File?|?Settings?|?File?Templates.
--%>
<%@?page?contentType="text/html;charset=UTF-8"?language="java"?%>
<html>
??<head>
????<title>struts2方法執行了</title>
??</head>
??<body>
?????<a?href="hello.action">帶有hello的action</a>
??</body>
</html>package?com.org.web.action;
public?class?Hello?{
????public?String?sayHello(){
????????System.out.println("方法執行了");
????????return?"success";
????}
}
1 回答

嗯恩恩
TA貢獻11條經驗 獲得超1個贊
500錯誤說明IIS服務器無法解析ASP代碼,訪問一個靜態頁面試試是否也出現這個問題,如果訪問靜態頁面沒問題,那就要分以下幾種 情況來分析了: ① 你是否改變過計算機名稱。 ② 站點所在的文件目錄是否自定義了安全屬性。 ③ 安裝了域控制器后是否調整了域策略。如果是其中的一種情況,請一一將 改變的參數設置回來看是否解決問題。 如果靜態空間也無法訪問,則說明解析還沒生效
添加回答
舉報
0/150
提交
取消