Hi,
I dont see
<%@(protected)" %>
in your jsp page, this may be the problem.
Thanks,
Nuwan.
----- Original Message -----
From: "ekoje ekoje" <jokeout@(protected)>
To: "user" <user@(protected)>
Sent: Wednesday, February 28, 2007 12:04 PM
Subject: Mgnt Error message
> HI Guys,
>
> I tried to manage some custom error messages using ActionMessage and
> ActionError. I set the text message in the Action and redirect to the
> ERROR
> result but I don't have any text displayed in the JSP when I use
> actionmessage tag and actionerror tag.
>
> Did i miss something ? any configuration ?
>
> Please find my code,
>
> Action:
>
>
> import
javax.servlet.http.HttpServletRequest;
>
> import
org.apache.struts2.interceptor.ServletRequestAware;
>
> import
com.opensymphony.xwork2.ActionSupport;
>
> public class TestAction extends ActionSupport implements
> ServletRequestAware
> {
>
> private static final long serialVersionUID = -7505437345373234225L;
>
> private HttpServletRequest request;
>
> public String execute(){
> addActionMessage("TESSSSSSSS");
> addActionError("SECONDDDDDDDDDDD");
> return ERROR;
> }
>
> public void setServletRequest(HttpServletRequest httpServletRequest) {
> this.request = httpServletRequest;
> }
> }
>
>
> JSP COde:
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <%@(protected)"
> pageEncoding="ISO-8859-1"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> </head>
> <title>Insert title here</title>
> </head>
> <body>
> <h3>Error Message</h3>
>
> <s:actionerror />
>
> <h3>Error Message</h3>
> <s:fielderror />
>
> <h3>Error Message</h3>
> <s:actionmessage />
>
> </body>
> </html>
>
>
> I will apreciate any help.
>
> Thanks,
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)