Meenakshi j wrote:
Hello,
  Can someone tell me, in case a null value, how I can use ActionErrors to 
return an error to a jsp page and show a pop up to a user describing the error?

To send the error from your action:

    public String execute(
            HttpServletRequest request,
            HttpServletResponse response) {

        ...

        ActionErrors errors = new ActionErrors();
        errors.add(new ActionMessage("key");
        saveErrors(request, errors);

        ...
    }

In your JSP, you'd render it using the <html:errors> or (preferred) <html:messages> tags. Use one of those to inject the error message into your popup Javascript or HTML markup.

L.

[1] http://struts.apache.org/1.x/struts-taglib/tlddoc/html/errors.html
[2] http://struts.apache.org/1.x/struts-taglib/tlddoc/html/messages.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to