本人用的是myeclipse8.5自带的struts2 好像是2.1.8版本,那个datetimepicker标签和tree标签怎么显示未知标记啊,看了网上说的是加 <%@ taglib uri="/struts-dojo-tags" prefix="sd"%> 再引入struts2的dojo包,可是运行时却显示空白,tree也如此啊 怎么回事 

解决方案 »

  1.   

    开头加了 <s:head theme="ajax"/> 还没用啊 郁闷啊
      

  2.   

    struts218 把dojo dwr 分到某些jar包里了 。
     所以<s:head theme="ajax"/> 要删掉,而加上 <sd:head/> <%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false"%>
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="sx" uri="/struts-dojo-tags"%><html>
    <head>
    <title>Div演示</title>
    <sx:head />
    </head> <body>
    <sx:div cssStyle="border:1px solid black;height:25px;width:500px"
    href="ServerTime" updateFreq="1000" autoStart="false"
    startTimerListenTopics="startTimer" highlightColor="#ffcdee">
      服务器当前时刻
    </sx:div>
    <s:submit id="button1" theme="simple" value="开始计时"
    onclick="dojo.event.topic.publish('startTimer')" />
    </body>

    </html>