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

為了賬號安全,請及時綁定郵箱和手機立即綁定

JAVA_Struts2學習小計

標簽:
Java

1、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=" <display-name>HelloWorldStruts2</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<filter>
<filter-name>struts2</filter-name>
<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>
2、struts2.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"
http://struts.apache.org/dtds/struts-2.0.dtd">
<!-- url-action-method(exacute())-result(view) -->
<struts>
<!-- namespace URL的逻辑路径 -->
<package name="test" namespace="/first" extends="struts-default">
<!-- action中name可以支持通配符 如hello_* method='{1}'-->
<action name="hello" class="com.pluto.action.HelloWorld">
<!-- 可以有多个result 根据action方法返回值与指定的name值匹配
返回相应视图 -->
<result name="success_say">/helloworld.jsp</result>
</action>
<!-- Add your actions here -->
</package>

</struts>
3、action类
package com.pluto.action;

import com.opensymphony.xwork2.ActionSupport;

public class HelloWorld extends ActionSupport
{

private String uname;

@Override
public String execute() throws Exception
{
    return "success_say";
}

public String getUname()
{
    return uname;
}

public void setUname(String uname)
{
    this.uname = uname;
}

}

點擊查看更多內容
2人點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優(yōu)質文章

正在加載中
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優(yōu)惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消