1)不使用Validator静态产生js,直接在客户端使用js
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<html:html>
<HEAD>
<TITLE>New Account Registration</TITLE>
<script type="text/javascript">
function runMyJavascript() {
alert ("Hello from function");
}
function add()
{
alert("Hello this add");
}
</script>
</HEAD>
<BODY BGCOLOR="#FDF5E6">
<html:form action="/login.do">
Password : <html:text property="password" /><br>
<html:button property="butType" value="Edit" onclick ="runMyJavascript()" />
<html:button property="addButton" value ="Add" onclick ="add()"/>
</html:form>
</BODY>
</html:html>
2)
jstl的一些常用web开源组件(如xtree,树型菜单等),
http://www.husted.com/central/Resources/