摘要:
这个文件是放在web-inf下面的struts-config.xml文件中的每一个<action/>节点都对应一个ActionMapping<action path="/login" name="loginForm" type="cn.itcast.LoginAction" scope="request" validate="false"> <forward name="LoginSuccess" path="http://www.ba 阅读全文
摘要:
Action必须用一种线程安全的方式来编程,因为Controller会为多个同步请求共享相同的实例。 1、Action中的实例变量和静态变量不能够用来存储与特定请求状态有关的信息。对于同一个Action的访问它可能用来共享全局资源。 2、对于其他资源的访问 (JavaBeans, session variables, etc.) 必须被同步如果这些资源要求保护 (Generally, however, resource classes should be designed to provide their own protection where necessary)。Action相当于一个适 阅读全文