Hi,
I've spent some time checking the list for this issue,
but I could only find related topics, that didn't really help.
In case that this has been answered before, please ignore it
and send me a link.
I think that there must be something I've missed
when using the Struts validation feature within frames.
In short: I'm trying to manually retrieve and "forward" the ActionErrors
within a frame definition page (which is the "input" page
for a mapping). But those manually set request parameters
are gone when I access them.
The situation is as follows:
The page myframe.jsp consists of two frames:
mynavigation.jsp and myContent.jsp.
myContent.jsp is the JSP that is validated.
In case that a validation error (ActionError) occurs,
the follwoing (relevant) events occur (correct me if I'm wrong)
- Struts puts the ActionErrors I created within validate into the request
- a forward to the "input" page is done as defined in the struts-config (in
my case the "action" entry is:
<action path="/myContentActionPath"
type="some.SomeAction"
name="contentForm"
scope="session"
validate="true"
input="/myframe.jsp">
<forward name="back" path="/somePrev.jsp"/>
<forward name="next" path="/someNext.jsp"/>
</action>
so it leads to the frame page.
- within the myframe.jsp, two new requests are created: one for each frame
But I think I should still be able to access the request with the ActionErrors
within the frame definition page. So in myframe.jsp I could do something like:
myframe.jsp:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<head>
<html:base/>
<title>MyTitle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset cols="150,*" frameborder="no" border="0" framespacing=0>
<frame src="myNavigation.jsp" NAME="Menue">
<frame src="myContent.jsp?manuallySetParam=<html:errors
property="myErrorProperty"/>" NAME="content">
</frameset>
<noframes>
</noframes>
</html:html>
in order to retrieve the ActionError String for property "myErrorProperty"
within the content page:
myContent.jsp:
...
<P> <%= request.getParameter("manuallySetParam") %> </P>
....
This - I agree - doesn't look elegant, but at least it should work.
If I have the input page defined as a pure jsp (no frames),
the html:errors are retrieved as expected.
Are there any ideas, why the parameter "manuallySetParam" does not
contain the error message of key "myErrorProperty" ?
Help and/or design suggestions greatly appreciated!
Thanks in advance,
Holger
________________________________________________________________
Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr!
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>