ActionMessages errors = new ActionMessages();
errors.add("ExistLoginName",new ActionMessage("admin.user.jsp.existlogin",this.loginName));
<html:messages id="ExistLoginName" property="ExistLoginName" message="true">
<script language="javascript" type="text/javascript">
alert("<bean:write name="ExistLoginName"/>");
</script>
</html:messages>