第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

正在回答

4 回答

web.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns="http://xmlns.jcp.org/xml/ns/javaee"

xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"

id="WebApp_ID" version="3.1">

<display-name>Struts2練習(xí)</display-name>

<filter>

<filter-name>struts2</filter-name>

<!-- 特別說明如下?

struts2.3版本路徑是org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter?

struts2.5版本后路徑是org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter -->

<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>

</filter>

<filter-mapping>

<filter-name>struts2</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

</web-app>

---------------------------------------------------我是分割線--------------------------------------------

struts.xml

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC

? ? "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"

? ? "http://struts.apache.org/dtds/struts-2.5.dtd">

<struts>

<package name="default" namespace="/" extends="struts-default">

<action name="HelloWorldAction" class="com.sadfoo.imooc.action.HelloWorldAction">

<!-- 定義邏輯視圖和物理資源之間的映射 -->

<result name="success">/result.jsp</result>

</action>

</package>

</struts>

-------------------------------------------------------我是分隔符---------------------------------------------

action(HelloWorldAction)

package com.sadfoo.imooc.action;


import com.opensymphony.xwork2.ActionSupport;


/**

?*?

?* @author sadfoo 2018年6月28日下午12:41:09

?*/

@SuppressWarnings("serial")

public class HelloWorldAction extends ActionSupport {

/*

* (non-Javadoc)

*?

* @see com.opensymphony.xwork2.ActionSupport#execute()

*/

@Override

public String execute() throws Exception {

System.out.println("執(zhí)行action");

return SUCCESS;

}

}

---------------------------------------------------------我是分割線------------------------------------------

result.jsp

<%@ page language="java" 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>練習(xí)struts2</title>

</head>

<body>

<h1>This is my first JSP test page!</h1>

</body>

</html>

------------------------------------------------我是分割線--------------------------------------------

訪問地址和:http://localhost:8080/Struts2/HelloWorldAction.action

2 回復(fù) 有任何疑惑可以回復(fù)我~
#1

qq_拓拔草_0

我現(xiàn)在報(bào)這個(gè)錯(cuò)是咋回事啊。我用的Tomcat9 Type Status Report Message There is no Action mapped for namespace [/] and action name [] associated with context path [/HelloWorld]. Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
2018-09-13 回復(fù) 有任何疑惑可以回復(fù)我~

謝謝樓主和回答者

0 回復(fù) 有任何疑惑可以回復(fù)我~

為什么我用了struts2.5版本后路徑是org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter 后,tomacat無法啟動(dòng),用了struts2.3版本路徑是org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 這個(gè)后只是無法訪問到網(wǎng)頁(yè)

0 回復(fù) 有任何疑惑可以回復(fù)我~

https://img1.sycdn.imooc.com//5b34a8540001a3f602790202.jpg

我用的是struts2.6.15 ?

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

qq_袮D影孑_03909390

為什么我用了struts2.5版本后路徑是org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter 后,tomacat無法啟動(dòng),用了struts2.3版本路徑是org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 這個(gè)后只是無法訪問到網(wǎng)頁(yè)
2018-08-15 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

有沒有源碼呀

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)