struts2.0到struts2.1有一个重要的改变就是对ajax支持的改变,struts2.0的ajax支持主要以DWR和dojo为主,并专门提供ajax主题,如:<struts:head theme="ajax"/>,
但是在struts2.1不在提供ajax主题,而将原来的ajax主题放入了dojo插件中,我们需要将dojo标签引入到jsp页面,
<%@ taglib uri="/struts-tags" prefix="struts" %>
<%@ taglib uri="/struts-dojo-tags" prefix="ss" %>
将
<struts:head theme="ajax" />
改成下面这两行,其他的不用改:
<struts:head theme="xhtml"/>
<ss:head parseContent="true"/>