Getting Struts ActionErrors through frames

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top