Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Servlet/JSP/JSF/JavaFX Script
打印话题 寄给朋友 订阅主题 |
作者 | Re:该不该用Struts的标签? 困扰我很久的问题~~ [Re:binghe996] |
Jcat
熊猫的猫 发贴: 266 |
于 2006-07-08 11:56
我觉得应该用,甚至是只能用(至少在我实习的地方是这样规范的) <%.....%>这种东西(除了在文件头的声明部分)是被禁止使用的! HTML的标签也是能不用就不用,都用"http://struts.apache.org/tags-html"代替。 编程,游泳,睡觉--SleepingCat |
作者 | Re:该不该用Struts的标签? 困扰我很久的问题~~ [Re:binghe996] |
wz45855360
发贴: 6 |
于 2006-07-08 14:02
同意楼上的说法 <%...%>这个东西在好在jsp页面少用 |
作者 | Re:该不该用Struts的标签? 困扰我很久的问题~~ [Re:binghe996] |
binghe996
发贴: 4 |
于 2006-07-08 15:17
楼上的两位还是没有回答出我的问题啊? 如果选用方案1,就必须用<%...%> 如果选用方案2,就必须用<input type="text"/> 哪一个更好呢? |
作者 | Re:该不该用Struts的标签? 困扰我很久的问题~~ [Re:binghe996] |
Jcat
熊猫的猫 发贴: 266 |
于 2006-07-08 17:19
又想了想,我觉得都不好。我实在很讨厌在jsp中看见<%...%>,文件头除外。 对方案1改进一下或许会更好: 还是结合上EL吧,这样你的代码就可以像这样 <html:text property="title" maxlength="50" styleClass="textStyle" value="${SETNEWS.title}"/> 当然,你必须在forward这个页面文件的Action中(注意,不是要处理这个页面信息的Action),为HttpServletRequest对象set好SETNEWS这个attribute。 感觉这也有点IoC的韵味(有点小题大做了)
Jcat edited on 2006-07-08 17:53
编程,游泳,睡觉--SleepingCat |
作者 | Re:该不该用Struts的标签? 困扰我很久的问题~~ [Re:binghe996] |
hitaco
发贴: 432 |
于 2006-07-10 23:08
只用html作form binding,否则太麻烦。 至于其他的,比如bean,logic,等等,就不必了,可用JSTL+JSP2 EL 通常公司会有相关的要求,保持代码一致。 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |