来自:http://www.matrix.org.cn/blog/liu2liu2/
ajaxtags项目是在现有的struts html标记库的基础上,添加对ajax支持。 ajaxtags改写了struts标签类org.apache.struts.taglib.html.formtag和org.apache.struts.taglib.html.basehandlertag,并使用struts的plugin技术,使得struts提供了对ajax的支持。 以下是jsp中简单的示例:
<html:form action="example1" ajaxref="example1">
first name: <html:text property="firstname" size="25" value="frank" />
<br>
last name: <html:text property="lastname" size="25" value="zammetti" />
<br>
<html:button property="button" value="click to do ajax!" ajaxref="button" />
</html:form>
result:<br>
<span id="example1_resultlayer"> </span>
<!doctype ajaxconfig public "ajaxconfig" "ajaxconfig">
<ajaxconfig>
<!-- define a custom request handler that generates xml for example 2 -->
<handler name="customxmlgenerator" type="request">
<function>customgeneratexml</function>
<location>customxmlgenerator.js</location>
</handler>
<!-- configuration for example 1 -->
<form ajaxref="example1">
<element ajaxref="button">
<event type="onclick">
<requesthandler type="std:querystring">
<target>example1.do</target>
<parameter>firstname=firstname,lastname=lastname</parameter>
</requesthandler>
<responsehandler type="std:innerhtml">
<parameter>example1_resultlayer</parameter>
</responsehandler>
</event>
</element>
</form>
</ajaxconfig>
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器