M
msa
Hi there,
I'm being forced to use frames by my manager for our application. I'm
trying to figure out how to get the <html:errors> object in a frame.
Can the <html:errors> object be passed through a frameset? If so,
how? Here is my situation:
I have a JSP called MyPage.jsp that invokes action MyAction when the
user clicks OK. If an error occurs in MyAction, I want to reload the
frameset that contains a frame whose target is MyPage.do, and show the
errors contained in <html:errors>. The action MyPage.do definition is
as follows:
<action path="/MyPage" forward="/MyPage.jsp" />
I've tried the following to retrieve the error message, but it just
renders the "<html:errors property="theError">" part as a string
instead of executing the Struts <html:errors> tag to output the error
message.
<frameset cols="150,*" border=0 frameborder=0 framespacing=0>
<frame src="nav.do" name=nav>
<frame src="MyPage.do?errors=<html:errors property="theError"/>"
name=content>
</frameset>
And in MyPage.jsp, the line <%= request.getParameter("errors") %> just
renders <html:errors property="theError"/> in the page source, without
actually retrieving the error message set in this ActionError object.
I've tried using different quotation combinations to such as
<frame src='MyPage.do?errors=<html:errors property="theError"/>'
name=content>
and
<frame src="MyPage.do?errors=<html:errors property='theError'/>"
name=content>
but with no luck.
Can the <html:errors> object be passed through a frameset? If so,
how?
Any suggestions would be greatly appreciated!
Thanks!
I'm being forced to use frames by my manager for our application. I'm
trying to figure out how to get the <html:errors> object in a frame.
Can the <html:errors> object be passed through a frameset? If so,
how? Here is my situation:
I have a JSP called MyPage.jsp that invokes action MyAction when the
user clicks OK. If an error occurs in MyAction, I want to reload the
frameset that contains a frame whose target is MyPage.do, and show the
errors contained in <html:errors>. The action MyPage.do definition is
as follows:
<action path="/MyPage" forward="/MyPage.jsp" />
I've tried the following to retrieve the error message, but it just
renders the "<html:errors property="theError">" part as a string
instead of executing the Struts <html:errors> tag to output the error
message.
<frameset cols="150,*" border=0 frameborder=0 framespacing=0>
<frame src="nav.do" name=nav>
<frame src="MyPage.do?errors=<html:errors property="theError"/>"
name=content>
</frameset>
And in MyPage.jsp, the line <%= request.getParameter("errors") %> just
renders <html:errors property="theError"/> in the page source, without
actually retrieving the error message set in this ActionError object.
I've tried using different quotation combinations to such as
<frame src='MyPage.do?errors=<html:errors property="theError"/>'
name=content>
and
<frame src="MyPage.do?errors=<html:errors property='theError'/>"
name=content>
but with no luck.
Can the <html:errors> object be passed through a frameset? If so,
how?
Any suggestions would be greatly appreciated!
Thanks!