首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

施用Struts2的标签是不是有点恐怖

2012-10-31 
使用Struts2的标签是不是有点恐怖?刚刚接触struts2的标签,做了以下一个测式在jsp的头部加入 heads:head

使用Struts2的标签是不是有点恐怖?
刚刚接触struts2的标签,做了以下一个测式

在jsp的头部加入 <head><s:head /></head>

在<body><s:datetimepicker tooltip="Select Your Birthday" label="生日"
name="birthday" displayFormat="yyyy-MM-dd"/>
</body>

当执行上面的jsp时,页面得到的结果如下:
<link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
<script type="text/javascript">
    // Dojo configuration
    djConfig = {
        baseRelativePath: "/struts/dojo",
        isDebug: false,
        bindEncoding: "UTF-8",
        debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
    };
</script>
<script type="text/javascript"
        src="/struts/dojo/dojo.js"></script>
<script type="text/javascript"
        src="/struts/simple/dojoRequire.js"></script>

<link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
<script type="text/javascript">
    // Dojo configuration
    djConfig = {
        baseRelativePath: "/struts/dojo",
        isDebug: false,
        bindEncoding: "UTF-8",
        debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
    };
</script>
<script type="text/javascript"
        src="/struts/dojo/dojo.js"></script>
<script type="text/javascript"
        src="/struts/simple/dojoRequire.js"></script>

可以正常显示,但是在firefox 用firebug 的YSlow插件测式,在本机都要用个三四秒,只是为了加一个日期选择,整个页面就被引入了481KB,YSlow的平分由98分,降到42分,太惨不忍赌了,不知道大家都用些什么方式引入日期选择器呢?

这些都是struts标签包装好的,struts2引入的dojo.js就有二百多KB,如果网速慢还得了,在本机都要用个3秒中,再加上页面的查询,那不是要命么,不知道有没有其它用法 听说这个2.X和1.X之间的差别是很大的,这样,入门的话,是不是要在这个版本的问题上考虑一下???

我是在两天前才学STRUTS的,还没有任何经验可谈,,,,    35 楼 luckaway 2008-09-07   现在都流行模板了。还用什么标签 36 楼 lingzantia 2008-09-30   只用非ui标签,ui标签太不好控制 37 楼 taupo 2008-09-30   严重一般都用JQUERY
很不错啊 38 楼 jackyrong 2008-10-08   我觉得目前struts2还是没啥IDE好支持的,起码能象struts1那样,有eclipse等支持时,那才好,
而且dreamweaver也不支持,用了freemarker的话,有的象<form>表单里的东西还是要
用回struts2,这时struts2的标签也在dreamweaver里显示不出来,比较麻烦呀 39 楼 careprad 2009-01-16   struts2是一坨屎! 40 楼 kjj 2009-01-17   标签就算了吧,jstl就够了

热点排行