0
我想在struts 2.2.3中使用ajax实现表单提交。 我将dojo插件库导入到ma项目中,这就是我的jsp的样子。Struts 2.2.3 dojo表单提交
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<sx:head/>
</head>
<body>
<div class="container" id="container">
<jsp:include page="menu.jsp" />
<s:actionerror/>
<s:form action="Login" method="post">
<s:textfield name="username" label="User Name"/>
<s:password name="password" label="Password"/>
<s:submit type="submit" align="right" />
</s:form>
</div>
</body>
</html>
我知道这里没有使用“sx”的东西。现在,jsp可以正常工作,刷新页面。我希望使用ajax发送数据(不刷新页面)。我应该修改什么来实现这个目标?如果任何人都可以提供给我一个示例或教程的链接,它显示带有Ajax表单提交的struts2,那将会非常有帮助。使用SX
你看到'** [道场提交]的标签Reference'(http://struts.apache.org/2.1.8.1/docs/ Dojo的submit.html)**? – lschin 2011-06-01 10:51:41
目前你有任何投资于道场吗?你有没有考虑过jQuery + Struts2 JSON插件?如果你没有对道场的投资,我会推荐后者。 – Quaternion 2011-06-01 22:02:10
不,我还没有开始。我可以考虑使用jQuery + Struts2 JSON插件。你能指导我开始一个好的教程吗? – user759740 2011-06-02 05:54:37