thanks I will try it out, I knew it was something I must have missed
Werner
Albrecht Leiprecht wrote:
Shouldn't it be something like
<html:messages name="message"/>
or
<html:messages property="message"/>
instead?
Rgds albi
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Werner Punz
Sent: Saturday, August 13, 2005 10:32 PM
To: user@struts.apache.org
Subject: weird message problem
Hi I am trying to add a simple error handler to a form with a message
upon an error condition, so far it works, some kind of message arrives
but I get a weird error, here are the relevant code snippets:
the part where the error is added:
ActionMessages errors = new ActionMessages();
errors.add("message", new ActionMessage("type mismatch
failure"+detail));
super.saveMessages(request,errors);
ActionForward returnActionForward =
mapping.findForward("failure");
return returnActionForward;
now the form code is like following:
<html:messages id="message" message="true" >
xxx
<li><bean:write name="message" /></li>
</html:messages>
and the failure forward set like following (and also triggered)
<action attribute="data" name="AssetDetailForm"
path="/assetDetailSubmit" scope="request"
type="com.sonydadc.claudio.struts.asset.actions.AssetDetailAction">
<forward name="success"
path="/WEB-INF/jsps/core/asset/Simpleone.jsp" />
<forward name="pubreqsuccess"
path="/WEB-INF/jsps/core/asset/PubRequestSuccess.jsp" />
<forward name="failure"
path="/WEB-INF/jsps/core/asset/AssetDetailMain.jsp" />
</action>
the funny thing is the code is triggered because if I remove the bean
write the xxx is called
but now I get following error:
Servlet.service() for servlet action threw exception
<javax.servlet.jsp.JspException: Cannot find bean message in any
scope>javax.servlet.jsp.JspException: Cannot find bean message in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:992)
at
org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:227)
at
org.apache.jsp.WEB_002dINF.jsps.core.asset.AssetDetailMain_jsp._jspx_meth_be
an_write_0(org.apache.jsp.WEB_002dINF.jsps.core.asset.AssetDetailMain_jsp:64
2)
at
org.apache.jsp.WEB_002dINF.jsps.core.asset.AssetDetailMain_jsp._jspService(o
rg.apache.jsp.WEB_002dINF.jsps.core.asset.AssetDetailMain_jsp:255)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
which means basically it has the message but the message bean itself is
not reachable thus the entire messaging system fails.
Does anyone know why this happens?
Werner
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]