struts2默认Action

来源:互联网 发布:中科院的飞箭软件 编辑:程序博客网 时间:2024/05/22 14:31

struts.xml:

<struts>    <constant name="struts.devMode" value="true" />        <package name="default" namespace="/" extends="struts-default">    <default-action-ref name="index"></default-action-ref>    <action name="index">    <result>/default.jsp</result>    </action>    </package></struts>

default.jsp:

<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=GB18030" /><title>DefaultAction</title></head><body>Default Action!</body></html>

运行:

http://localhost:8080/struts2_0100_introduction/

0 0
原创粉丝点击