如何使用struts,在客户端的jsp里面有类似javascript的alert功能?

请大侠帮忙:
如何在使用struts这个framework时,在web页上像javascript一样在客户端有验证功能?比如当密码输入为空时,直接弹出窗口警告密码域不能为空?? thanks.........