posts - 51, comments - 17, trackbacks - 0, articles - 9
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

Struts 学习笔记

Posted on 2007-03-11 13:24 chenweicai 阅读(70) 评论(0)  编辑  收藏
1. 超连接
在struts 中可以将一个超连接定义为ActionForward  这个对象有两个属性:name和path。如:
<forward name="welcome" path="/path/index.html">
2.HTML表单
提供了一个ActionForm类 ,其实就是一个javaBean 其中有setter和getter方法。
在Struts-config.xml配置文件中要对表单设置,<form-bean>或者是<form-beans> 如
<form-beans>
  <form-bean name ="logonForm" type="com.yourcompany.struts.form.LogonForm">
……
</form-beans>

3.定制动作
由Action类处理

4.Actionmapping

<action-mappings>
   <action 
      path=""
      type=""
      name=""
      score=""
      validate=""
      input="">

</action-mappings>
5.ActionServlet类

只有注册用户登录后才能发表评论。


网站导航: