Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > BOOK: Professional Jakarta Struts
|
BOOK: Professional Jakarta Struts
This is the forum to discuss the Wrox book Professional Jakarta Struts by James Goodwill, Richard Hightower; ISBN: 9780764544378
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Jakarta Struts section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 9th, 2004, 11:58 AM
Authorized User
 
Join Date: Nov 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default pass html:errors to one of the frames

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>

<frameset 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...
--------------------------------------------------------
ActionErrors errors = new ActionErrors();

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

if(!errors.isEmpty()){
saveErrors(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.



 
Old May 18th, 2004, 12:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you still having problems with this code?

XUMUSKIEFAN
Wrox Moderator





Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding Frames (HTML) rupen Javascript How-To 4 June 1st, 2005 03:50 AM
regarding frames in html preethi.c Beginning VB 6 1 March 9th, 2005 04:52 PM
Can't get errors to display with <html:errors> michaeldill JSP Basics 0 August 2nd, 2004 01:47 PM
HTML Frames sasidhar79 Javascript 2 May 4th, 2004 12:26 PM
Using HTML Frames in J2EE architecture voy7 J2EE 1 June 25th, 2003 05:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.