怎么这么多地方都开始用struts2.0了吗?

解决方案 »

  1.   

    <action name="Logon!*" method="{1}"
                class="com.cleversoft.struts2.demo.Logon">
                <result type="redirect-action">Menu</result>
                <result name="input">/Logon.jsp</result>
            </action>
    “method="{1}"”等价于“method=input”,这是通配符式的写法。
      

  2.   

    那这个1具体是指的什么意思?这个1是用来代替input的吗?不知道在哪个文档里有这个的介绍。
    Login_* 这个又是什么意思?
      

  3.   

    推荐一个学习struts2.0的blog
    http://www.blogjava.net/max/category/16130.html我看完了 还不错.
      

  4.   

    <action name="Login_*" method="{1}" class="mailreader2.Login">
    中Login_*带*是什么意思?method="{1}"带{}这个是什么意思?
    ====================================================
    name="Login_*"
    代表这个action处理所有以Login_开头的请求
    method="{1}"
    根据前面请求Login_methodname,调用action中的以methodname命名的方法
    class="mailreader2.Login"
    action的类名称如jsp文件中请求Login_validateUser的action名称,根据上面配置,调用action类mailreader2.Login类中方法validateUser()
    又如:
    对于Login_update请求,将会调用mailreader2.Login的update()方法。它的用法同webwork中的!符号的作用,相当于是一个通配符。