当前位置: 代码迷 >> Web前端 >> struts 1.x 学习 札记1
  详细解决方案

struts 1.x 学习 札记1

热度:431   发布时间:2013-03-04 17:22:12.0
struts 1.x 学习 笔记1

配置struts 1.x 要做的以下几件事,,

1. 导入jar

2. web.xml配置actionServlet

3. struts-conf.xml

4. 配置formBean

5. 配置action

?

action-mapping属性包括:

path(必须),

type(必须),

name(是frombean的名字)

scope(作用域,只有session和request),

attribute(是把form放在session和request里面的名字)

forward属性包括: name,path(必须是唯一),redirect

?

当只写必要的属性时就是用来当做路转的

?

?

MVC的定义可以分广义的和狭义的

?

struts的组件:

ActionServlet,ActionForm,ActionBean,ActionMapping,ActionForward

?

1.${sessionScope.xxx.xxx}

? ?${requestScope.xxx.xxx}

2.怎么样做可以让系统启动时做某些事情

? a.filter

? b.servlet?

? c.linsten

? d.static

?

?

?

  相关解决方案