`
qdpurple
  • 浏览: 272669 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

struts action 疑惑求解

阅读更多

Struts 使用疑问:

1.Struts ,action中配置bean属性,

UserAction{

userId,

userName

}

MVC架构中, Action其实充当的为 ControllerModel

角色, 由于使用的bean属性较多, Action中有太多的属性

getter,setter 方法,这样再使用action方法,显得action

比较臃肿, 能否这样?

Action 纯粹作为controller, 另创建model:

UserAction {

User;

}

User{

userId,

userName

}

若这样的话(即使用Action和Bean类), 页面表单(user)怎么配置?

之前只要将 UserAction中的 userId, userName

配置到页面表单的 name属性即可.

 

2. 另外, 关于struts标签, 本人只在学习中,使用到这些标签,而在真正项目中未使用,

不知大家怎么看待struts标签?

个人感觉struts标签较死板, 使用不便.

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics