The Artima Developer Community
Sponsored Link

Java Answers Forum
pass html:errors to one of the frames

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
srivalli

Posts: 1
Nickname: srivalli9
Registered: Apr, 2004

pass html:errors to one of the frames Posted: Apr 9, 2004 8:55 AM
Reply to this message Reply
Advertisement
Hi,

I have an Action class that creates some errors as coded below.
In Struts-config file, I forwarded this action to a jsp, called framespage.jsp.
This is a container of 3 frames, top, left and right.
Now, I want to display the errors in the left frame.
That is, I want to write <html:errors/> in left.jsp. But nothing is getting displayed!
When I tried writing <html:errors/> in framespage.jsp, they ARE displayed.
So, the fact is that these errors are NOT getting passed to one of the frames(left, in this case).

------------------------------------------------
The code in framepage.jsp is as follows...
-------------------------------------------------
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>

<html>
<head>
<title><bean:message key="ccrnumberkeywordsearch.title"/></title>
</head>

<frames et border="0" rows="265,*">
<html:frame frameName ="top" href="topbanner.jsp" />
<frameset border="0" cols="300,*">
<html:frame frameName ="left" href="left.jsp" paramName="ActionErrors.GLOBAL_ERROR" paramScope="request"/>
<html:frame frameName ="right" action="DeptList.do"/>
</frameset>
</frameset>

</html>
---------------------------- ------------------------------

I have problems accessing html:errors from this jsp.

In the Action class, I created some errors as follows...
--------------------------------------------------------
ActionError s errors = new ActionErrors();

errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("errors.ccrnumbersearch.nomatches"));

if(!errors.isEmpty()){
saveE rrors(request,errors);
}

return mapping.findForward("failure");
----------------------------------------------- ---------

I'm forwarding this Action to a jsp, called framespage.jsp.
This framespage.jsp has 3 frames, top(topbanner.jsp), left(left.jsp) and right(right.jsp)
Now, when i tried to print the errors in left.jsp, as...
--------------------------------------------------------
<html:errors/ >
--------------------------------------------------------
nothing is getting outputted.

Can any one explain me how to pass the ActionErrors from a framespage to one of its frame pages?

I tried to use <html:frame forward="left.jsp".../>, but of no use.
I tried paramId,paramName fields of html:frame element, but of no use, either.

I guess I'm missing some important concept here.

Any help in this regard is grately appreciated.

Thanks,
Srivalli.

Topic: encoding and basic authentication header Previous Topic   Next Topic Topic:

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use