RE: Struts Validation + Frames

2003-12-29 Thread Suresh Korvi
hi venkatesh

 You are saying that using lower frame 

 so see which to which form this page belongs to and put that form name in the 
validate.xml
 then it will display easily

 i am think this is the problem of placing the form name correctly


 suresh

-Original Message-
From: VENKATESH GANGAL [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 28, 2003 5:09 AM
To: [EMAIL PROTECTED]
Subject: Struts Validation + Frames


Hi ,

I have an application with two frames , one at the top and the other the bottom.

I am working on the lower frame and has problems in displaying errors after validating 
the form i.e when I submit only the lower part of the frame. I can see that the 
validate method is returning an error object but I am not able to display the errors 
in the same JSP but instead I get a blank page.

Can anyone know how to go about handling Errors in multiple frames ???

Thanks in advance..
Cheers..

Venkat






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts Validation + Frames

2003-12-29 Thread VENKATESH GANGAL
Hi Suresh,

I checked the name of the form in my validation.xml and varified that I am using the 
same name in my JSP also.

I am able to get the Error object from my form bean but I am unable to display it on 
my JSP.Is there anything else that I am missing ???

Thanks for  your help

Cheers...
Venkat


On Mon, 29 Dec 2004 Suresh Korvi wrote :
hi venkatesh

  You are saying that using lower frame

  so see which to which form this page belongs to and put that form name in the 
 validate.xml
  then it will display easily

  i am think this is the problem of placing the form name correctly


  suresh

-Original Message-
 From: VENKATESH GANGAL [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 28, 2003 5:09 AM
To: [EMAIL PROTECTED]
Subject: Struts Validation + Frames


Hi ,

I have an application with two frames , one at the top and the other the bottom.

I am working on the lower frame and has problems in displaying errors after 
validating the form i.e when I submit only the lower part of the frame. I can see 
that the validate method is returning an error object but I am not able to display 
the errors in the same JSP but instead I get a blank page.

Can anyone know how to go about handling Errors in multiple frames ???

Thanks in advance..
Cheers..

Venkat






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts Validation + Frames

2003-12-28 Thread VENKATESH GANGAL
Hi ,

I have an application with two frames , one at the top and the other the bottom.

I am working on the lower frame and has problems in displaying errors after validating 
the form i.e when I submit only the lower part of the frame. I can see that the 
validate method is returning an error object but I am not able to display the errors 
in the same JSP but instead I get a blank page.

Can anyone know how to go about handling Errors in multiple frames ???

Thanks in advance..
Cheers..

Venkat







Struts and frames: what about the request scope?

2003-10-30 Thread Jeroen Breedveld
Hi all,

I'm trying to use struts with frame but the problem I have is that forms
disappear from the request scope when I forward to an jsp containing a
frameset to other actions like this:

!-- jsp containing form submitting to someAction --
action path=/somePage forward=/WEB-INF/pages/some-page.jsp/

action path=/someAction
   input=/somePage.do  
  name=SomeForm scope=request
type=com.mycompany.actions.SomeAction
  forward name=success path=/framesetPage.do/
  forward name=failure path=/somePage.do/
/action

!-- jsp containing frameset --
action path=/framesetPage
forward=/WEB-INF/pages/frameset-page.jsp/

The frameset-jsp.page contains a frameset like this:

frameset framespacing=0 rows=50,*,
  html:frame frameborder=1 frameName=top-frame
action=topFrame.do/
  html:frame frameborder=1 frameName=bottom-frame
action=bottomFrame.do/
/frameset

Now in the actions topFrame and bottomFrame the form SomeForm does not
appear in the request scope. Why is this? Rightnow I solved it by
putting SomeForm in the session scope is that the only solution? I don't
think that is a clean one anyway.

Thanks for any help and regards,

Jeroen

--

X-Hive Corporation
e-mail: [EMAIL PROTECTED]
phone: +31 10 2818080
http://www.x-hive.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts and frames: what about the request scope?

2003-10-30 Thread Andrew Hill
Its not found in the request scope of the frames because each frame has a
DIFFERENT request. The browser will sent a seperate simultaneous request for
each individual frame.

If using session scope beware of potential concurrency issues as you will
have multiple threads accessing the same form object. Probably wont be an
issue if your just reading values for display though.

-Original Message-
From: Jeroen Breedveld [mailto:[EMAIL PROTECTED]
Sent: Thursday, 30 October 2003 18:49
To: [EMAIL PROTECTED]
Subject: Struts and frames: what about the request scope?


Hi all,

I'm trying to use struts with frame but the problem I have is that forms
disappear from the request scope when I forward to an jsp containing a
frameset to other actions like this:

!-- jsp containing form submitting to someAction --
action path=/somePage forward=/WEB-INF/pages/some-page.jsp/

action path=/someAction
   input=/somePage.do
  name=SomeForm scope=request
type=com.mycompany.actions.SomeAction
  forward name=success path=/framesetPage.do/
  forward name=failure path=/somePage.do/
/action

!-- jsp containing frameset --
action path=/framesetPage
forward=/WEB-INF/pages/frameset-page.jsp/

The frameset-jsp.page contains a frameset like this:

frameset framespacing=0 rows=50,*,
  html:frame frameborder=1 frameName=top-frame
action=topFrame.do/
  html:frame frameborder=1 frameName=bottom-frame
action=bottomFrame.do/
/frameset

Now in the actions topFrame and bottomFrame the form SomeForm does not
appear in the request scope. Why is this? Rightnow I solved it by
putting SomeForm in the session scope is that the only solution? I don't
think that is a clean one anyway.

Thanks for any help and regards,

Jeroen

--

X-Hive Corporation
e-mail: [EMAIL PROTECTED]
phone: +31 10 2818080
http://www.x-hive.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RE: Struts and frames: what about the request scope?

2003-10-30 Thread George Steimer
I had this same problem on the project I am working on.  Based on the functionality of 
the application, I could not put the form in session scope.  I got around this problem 
by having each frame call an action that recreated the form bean in request scope and 
then forwarded to the frame jsp.

George

 Its not found in the request scope of the frames because each frame has a
 DIFFERENT request. The browser will sent a seperate simultaneous request for
 each individual frame.
 
 If using session scope beware of potential concurrency issues as you will
 have multiple threads accessing the same form object. Probably wont be an
 issue if your just reading values for display though.
 
 -Original Message-
 From: Jeroen Breedveld [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 30 October 2003 18:49
 To: [EMAIL PROTECTED]
 Subject: Struts and frames: what about the request scope?
 
 
 Hi all,
 
 I'm trying to use struts with frame but the problem I have is that forms
 disappear from the request scope when I forward to an jsp containing a
 frameset to other actions like this:
 
 !-- jsp containing form submitting to someAction --
 action path=/somePage forward=/WEB-INF/pages/some-page.jsp/
 
 action path=/someAction
input=/somePage.do
   name=SomeForm scope=request
 type=com.mycompany.actions.SomeAction
   forward name=success path=/framesetPage.do/
   forward name=failure path=/somePage.do/
 /action
 
 !-- jsp containing frameset --
 action path=/framesetPage
 forward=/WEB-INF/pages/frameset-page.jsp/
 
 The frameset-jsp.page contains a frameset like this:
 
 frameset framespacing=0 rows=50,*,
   html:frame frameborder=1 frameName=top-frame
 action=topFrame.do/
   html:frame frameborder=1 frameName=bottom-frame
 action=bottomFrame.do/
 /frameset
 
 Now in the actions topFrame and bottomFrame the form SomeForm does not
 appear in the request scope. Why is this? Rightnow I solved it by
 putting SomeForm in the session scope is that the only solution? I don't
 think that is a clean one anyway.
 
 Thanks for any help and regards,
 
 Jeroen
 
 --
 
 X-Hive Corporation
 e-mail: [EMAIL PROTECTED]
 phone: +31 10 2818080
 http://www.x-hive.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts and frames: what about the request scope?

2003-10-30 Thread Kris Schneider
Here's another possibility. In the action that forwards to frameset-page.jsp,
create a Map (or Maps) containing the request parameters you want submitted to
the topFrame and bottomFrame actions. Save this Map as a request attribute.
Then, in frameset-page.jsp:

frameset framespacing=0 rows=50,*,
  html:frame action=/topFrame
  name=paramMap
  frameborder=1
  frameName=top-frame/
  html:frame action=/bottomFrame
  name=paramMap
  frameborder=1
  frameName=bottom-frame/
/frameset

If the parameters you want to propogate are already contained in an action form,
you could use either BeanUtils.describe of DynaActionForm.getMap to create the
Map for you.

Quoting George Steimer [EMAIL PROTECTED]:

 I had this same problem on the project I am working on.  Based on the
 functionality of the application, I could not put the form in session scope. 
 I got around this problem by having each frame call an action that recreated
 the form bean in request scope and then forwarded to the frame jsp.
 
 George
 
  Its not found in the request scope of the frames because each frame has a
  DIFFERENT request. The browser will sent a seperate simultaneous request
 for
  each individual frame.
  
  If using session scope beware of potential concurrency issues as you will
  have multiple threads accessing the same form object. Probably wont be an
  issue if your just reading values for display though.
  
  -Original Message-
  From: Jeroen Breedveld [mailto:[EMAIL PROTECTED]
  Sent: Thursday, 30 October 2003 18:49
  To: [EMAIL PROTECTED]
  Subject: Struts and frames: what about the request scope?
  
  
  Hi all,
  
  I'm trying to use struts with frame but the problem I have is that forms
  disappear from the request scope when I forward to an jsp containing a
  frameset to other actions like this:
  
  !-- jsp containing form submitting to someAction --
  action path=/somePage forward=/WEB-INF/pages/some-page.jsp/
  
  action path=/someAction
 input=/somePage.do
name=SomeForm scope=request
  type=com.mycompany.actions.SomeAction
forward name=success path=/framesetPage.do/
forward name=failure path=/somePage.do/
  /action
  
  !-- jsp containing frameset --
  action path=/framesetPage
  forward=/WEB-INF/pages/frameset-page.jsp/
  
  The frameset-jsp.page contains a frameset like this:
  
  frameset framespacing=0 rows=50,*,
html:frame frameborder=1 frameName=top-frame
  action=topFrame.do/
html:frame frameborder=1 frameName=bottom-frame
  action=bottomFrame.do/
  /frameset
  
  Now in the actions topFrame and bottomFrame the form SomeForm does not
  appear in the request scope. Why is this? Rightnow I solved it by
  putting SomeForm in the session scope is that the only solution? I don't
  think that is a clean one anyway.
  
  Thanks for any help and regards,
  
  Jeroen
  
  --
  
  X-Hive Corporation
  e-mail: [EMAIL PROTECTED]
  phone: +31 10 2818080
  http://www.x-hive.com

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts and frames: what about the request scope?

2003-10-30 Thread Jose Ramon Diaz
hi all,

 We use Frames in our application. We have had this problem a we use
different approach.
 We suppose the form data is ONLY needed for the action, so the action
executes and change the model as needed. The action decides which is the
next page, and if it can have frames it sets a variable next in session,
which indicates what the frames that must be loades in this way:

 Every frame in frameset is redirected to an special action frames.do with
two parameters: the place where the frame is loaded and the next variable.
For example:

frameset ID=vis cols=261,* border=0 framespacing=1
frame name=bottomLeft
src=frames.do?position=frameBottomaction=session:attribute
name=next/
frame name=bottomRight
src=frames.do?position=frameTopaction=session:attribute name=next/
/frameset

  And we have implemented the frames.do action to know which JSP must be
loaded, with parameters position and next. In fact, the page that must be
loaded is written in struts-config.xml in this way:

   action path=/frames type=package.FramesAction name=framesForm
scope=request
  forward name=frameTop-next1 contextRelative=true
path=/WEB-INF/jsp/jsp1.jsp/
  forward name=frameTop-next2 contextRelative=true
path=/WEB-INF/jsp/jsp2.jsp/ç



So the frames.do makes a forward to the String created with position+next
(the two parameter of frames.do) and we can establish the JSP in the xml
file...

Is this a complicated way of doing this? Sure,... above all because of my
poor english :-)


 Regards

Jose R. Díaz


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts with frames problem

2002-11-25 Thread Matthias Bauer
Karnal,

I know my answer comes pretty late, but nevertheless...

I guess you have switched off cookies in your browser, otherwise you 
would not use the session. Thus, try if the session is still there, when 
having cookies switched on.

If you still want to get your application to work when cookies are 
switched off (what you probably want to), then you need to url encode 
the src attributes of the frame tag, which ensures that the session id 
is appended to the url, if cookies are switched off.

Refer to the java documentation, if you need any more information about 
url rewriting.

Hope this helps,

--- Matthias


[EMAIL PROTECTED] wrote:

Hi,

Thank you very much.

I could not get the same context  by adding my application name to the
path. But as you said, i have my actions scope is request. The same scope
i am using for all the pages. All are working fine. Only with the frames, i
am not getting the same session.. Can you please explain me with samples,
how your stuff is working..

thanks a lot.




 
   Mouratidis,  
   Georg   To: Struts Users Mailing List [EMAIL PROTECTED] 
   GMouratidis@h   cc: (bcc: Kamal Konduru/AFS/CAPITAL) 
   eiler.com   Subject: RE: Struts with frames problem  
 
   11/20/2002
   12:18 AM  
   Please respond
   to Struts
   Users Mailing 
   List 
 
 




HI Kanal,

if you want do call an action from your frameset you have to use the
following syntax:

frame name=treeframe scrolling=Yes noresize src
=/YourApplicationName/frame1.do 

Please pay attention to the src-Attribut.
You can ommit the ApplicationName in the src attribut only the in action
attribute in the html:form.

You also have to be aware of the scope attribut in the appropriate action
in struts-config.xml.
If you use scope=request then you will get new instances.
Be aware of to forward to your jsps, not to redirect if you want to keep
your request-parameters.

I have many frames in my application at they work all well.
The main think is to think in actions.

i hope i could help you.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 19. November 2002 21:33
To: 'Struts Users Mailing List'
Subject: Struts with frames problem


HI,
I have problem with using frames in struts.  I am using a frameset which
has two frames, and i am including  src for example

frameset rows=80,* frameborder=NO border=0 framespacing=0  onResize
=if (navigator.family == 'nn4') window.location.reload()
 frame name=topFrame scrolling=NO noresize src=Top.jsp 
 frameset cols=190,* frameborder=NO border=1 framespacing=0 rows
=*
   frame name=treeframe scrolling=Yes noresize src =frame1.do 
   frame name=basefrm src =frame2.do
 /frameset
/frameset


In the frame1.do, i am calling frame1.jsp., in frame2.do i am calling
frame2.jsp. These are in same direcotry. When i see this in action servlet.
These two calls creating new sessions, rather taking from the existing
session.

Other than frames, other includes are not creating the sessions.

it is creating lot of problems in my application. If anyone came across,
please help me.

thanks in advance.
kamal



--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]

 





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Struts with frames problem

2002-11-20 Thread Mouratidis, Georg
HI Kanal,

if you want do call an action from your frameset you have to use the following syntax:

frame name=treeframe scrolling=Yes noresize src =/YourApplicationName/frame1.do 


Please pay attention to the src-Attribut. 
You can ommit the ApplicationName in the src attribut only the in action attribute in 
the html:form.

You also have to be aware of the scope attribut in the appropriate action in 
struts-config.xml. 
If you use scope=request then you will get new instances.
Be aware of to forward to your jsps, not to redirect if you want to keep your 
request-parameters.

I have many frames in my application at they work all well.
The main think is to think in actions.

i hope i could help you.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 19. November 2002 21:33
To: 'Struts Users Mailing List'
Subject: Struts with frames problem


HI,
I have problem with using frames in struts.  I am using a frameset which
has two frames, and i am including  src for example

frameset rows=80,* frameborder=NO border=0 framespacing=0  onResize
=if (navigator.family == 'nn4') window.location.reload()
  frame name=topFrame scrolling=NO noresize src=Top.jsp 
  frameset cols=190,* frameborder=NO border=1 framespacing=0 rows
=*
frame name=treeframe scrolling=Yes noresize src =frame1.do 
frame name=basefrm src =frame2.do
  /frameset
/frameset


In the frame1.do, i am calling frame1.jsp., in frame2.do i am calling
frame2.jsp. These are in same direcotry. When i see this in action servlet.
These two calls creating new sessions, rather taking from the existing
session.

Other than frames, other includes are not creating the sessions.

it is creating lot of problems in my application. If anyone came across,
please help me.

thanks in advance.
kamal



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Struts with frames problem

2002-11-20 Thread Kamal_Konduru

Hi,

Thank you very much.

I could not get the same context  by adding my application name to the
path. But as you said, i have my actions scope is request. The same scope
i am using for all the pages. All are working fine. Only with the frames, i
am not getting the same session.. Can you please explain me with samples,
how your stuff is working..

thanks a lot.




   
   
Mouratidis,   
   
Georg   To: Struts Users Mailing List 
[EMAIL PROTECTED] 
GMouratidis@h   cc: (bcc: Kamal Konduru/AFS/CAPITAL)  
   
eiler.com   Subject: RE: Struts with frames problem   
   
   
   
11/20/2002 
   
12:18 AM   
   
Please respond 
   
to Struts 
   
Users Mailing  
   
List  
   
   
   
   
   




HI Kanal,

if you want do call an action from your frameset you have to use the
following syntax:

frame name=treeframe scrolling=Yes noresize src
=/YourApplicationName/frame1.do 

Please pay attention to the src-Attribut.
You can ommit the ApplicationName in the src attribut only the in action
attribute in the html:form.

You also have to be aware of the scope attribut in the appropriate action
in struts-config.xml.
If you use scope=request then you will get new instances.
Be aware of to forward to your jsps, not to redirect if you want to keep
your request-parameters.

I have many frames in my application at they work all well.
The main think is to think in actions.

i hope i could help you.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 19. November 2002 21:33
To: 'Struts Users Mailing List'
Subject: Struts with frames problem


HI,
I have problem with using frames in struts.  I am using a frameset which
has two frames, and i am including  src for example

frameset rows=80,* frameborder=NO border=0 framespacing=0  onResize
=if (navigator.family == 'nn4') window.location.reload()
  frame name=topFrame scrolling=NO noresize src=Top.jsp 
  frameset cols=190,* frameborder=NO border=1 framespacing=0 rows
=*
frame name=treeframe scrolling=Yes noresize src =frame1.do 
frame name=basefrm src =frame2.do
  /frameset
/frameset


In the frame1.do, i am calling frame1.jsp., in frame2.do i am calling
frame2.jsp. These are in same direcotry. When i see this in action servlet.
These two calls creating new sessions, rather taking from the existing
session.

Other than frames, other includes are not creating the sessions.

it is creating lot of problems in my application. If anyone came across,
please help me.

thanks in advance.
kamal



--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Struts with frames problem

2002-11-19 Thread Kamal_Konduru
HI,
I have problem with using frames in struts.  I am using a frameset which
has two frames, and i am including  src for example

frameset rows=80,* frameborder=NO border=0 framespacing=0  onResize
=if (navigator.family == 'nn4') window.location.reload()
  frame name=topFrame scrolling=NO noresize src=Top.jsp 
  frameset cols=190,* frameborder=NO border=1 framespacing=0 rows
=*
frame name=treeframe scrolling=Yes noresize src =frame1.do 
frame name=basefrm src =frame2.do
  /frameset
/frameset


In the frame1.do, i am calling frame1.jsp., in frame2.do i am calling
frame2.jsp. These are in same direcotry. When i see this in action servlet.
These two calls creating new sessions, rather taking from the existing
session.

Other than frames, other includes are not creating the sessions.

it is creating lot of problems in my application. If anyone came across,
please help me.

thanks in advance.
kamal



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Struts with frames problem

2002-11-19 Thread mxranga

Kamal,

If possible avoid using Frames with Struts.  Check this list archive for
details.

If you open non-frame page first then let that page redirect to frame-set
page, this way you will be part of the original session.

- Manju



   

  Kamal_Konduru@ca 

  pgroup.com   To:  'Struts Users Mailing List' 
[EMAIL PROTECTED] 
   cc: 

  11/19/2002 12:32 Subject: Struts with frames problem 

  PM   

  Please respond   

  to Struts Users 

  Mailing List

   

   





HI,
I have problem with using frames in struts.  I am using a frameset which
has two frames, and i am including  src for example

frameset rows=80,* frameborder=NO border=0 framespacing=0  onResize
=if (navigator.family == 'nn4') window.location.reload()
  frame name=topFrame scrolling=NO noresize src=Top.jsp 
  frameset cols=190,* frameborder=NO border=1 framespacing=0 rows
=*
frame name=treeframe scrolling=Yes noresize src =frame1.do 
frame name=basefrm src =frame2.do
  /frameset
/frameset


In the frame1.do, i am calling frame1.jsp., in frame2.do i am calling
frame2.jsp. These are in same direcotry. When i see this in action servlet.
These two calls creating new sessions, rather taking from the existing
session.

Other than frames, other includes are not creating the sessions.

it is creating lot of problems in my application. If anyone came across,
please help me.

thanks in advance.
kamal



--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]





===
IMPORTANT NOTICE: This communication, including any attachment, contains
information that may be confidential or privileged, and is intended solely
for the entity or individual to whom it is addressed.  If you are not the
intended recipient, you should delete this message and are hereby notified
that any disclosure, copying, or distribution of this message is strictly
prohibited.  Nothing in this email, including any attachment, is intended
to be a legally binding signature.



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Struts and frames...

2002-01-29 Thread Steve Earl

Apologies if this topic has been covered before but I've searched the
archives and am still unclear.

I was wondering if there is an elegant way of having ActionErrors appear in
an input frame (should there be errors within the form) but having the
results of the action (a db lookup for example) appear in a second, output
frame should there be no validation errors.

At present I've managed to get it so that the ActionErrors will appear
within the output frame but really all this is doing is displaying the input
form (including errors) within the output frame. I stopped it re-displaying
the form itself in this frame by putting a series of logic tags around the
code within the input jsp.

Also, is there any more detailed information on how to configure struts in a
multi-frame environment. Specifically, my application is going to need to
have pop-up windows which, when closed will return to a multi-frame page. At
present I can get the new window to appear but closing it does not redisplay
the original page correctly.

Apologies again if this topic has been done to death

regards

__ 
Steve Earl

InfoGain Limited

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Struts and frames...

2002-01-29 Thread Steve Earl

Thanks Rob,

Unfortunately I don't really know javascript at all - which is why I was
hoping to be able to do this using jsp's only and the struts framework
(which I have oooh, all of 2 weeks experience with now!).

I guess there's no easy way of doing this without resorting to javascript

regards

steve

__ 

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 1:20 PM
To: Struts Users Mailing List
Subject: Re: Struts and frames...



I asked something similar to this on jGuru Struts FAQ.

I've done simple validation in a multiframe environment. I implemented the
(simple) validaton in JavaScript for a  form submit from one frame, with
the 'target' attribute set to another frame. If the JavaScript function
(invoked at form submit) detects a validation error, it allows the form
submit to proceed (calling the ActionForm to produce ActionErrors) but
first dynamically changes the form target to '_self' so the error messages
appear in the originating form.

You could also have the target (output) frame receive any ActionErrors in a
JavaScript variable and have it notify the originating frame of any errors
(using onLoad event), without changing the (visible) content of the target
(output frame).

Never done popup windows but I can feel one coming on...

Rob





 

Steve Earl

stevee@Infoga   To:
'[EMAIL PROTECTED]' [EMAIL PROTECTED]

in.co.ukcc:

 Subject: Struts and frames...

29/01/2002

11:28

Please respond

to Struts

Users Mailing

List

 

 





Apologies if this topic has been covered before but I've searched the
archives and am still unclear.

I was wondering if there is an elegant way of having ActionErrors appear in
an input frame (should there be errors within the form) but having the
results of the action (a db lookup for example) appear in a second, output
frame should there be no validation errors.

At present I've managed to get it so that the ActionErrors will appear
within the output frame but really all this is doing is displaying the
input
form (including errors) within the output frame. I stopped it re-displaying
the form itself in this frame by putting a series of logic tags around
the
code within the input jsp.

Also, is there any more detailed information on how to configure struts in
a
multi-frame environment. Specifically, my application is going to need to
have pop-up windows which, when closed will return to a multi-frame page.
At
present I can get the new window to appear but closing it does not
redisplay
the original page correctly.

Apologies again if this topic has been done to death

regards

__
Steve Earl

InfoGain Limited

--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]





--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Potential Concurrency Issue - Struts Forward/Frames/InternetExpl orer 6.0

2002-01-11 Thread Vaughan Jackson

Hi,

We have been looking at the implementation of an out of order request
detection mechanism very similar to the one built in to Struts. For a single
frame application, this works as follows, upon reception of a request:

1. The action object extracts a token (if any) from the session, and stores
it as 
  'the old token'.
2. The action object then generates a new token to identify the current 
request, and places this token in the session.
3. The action object compares the token it extracts from the 
current request (if any) with 'the old token', that previously in the
session.
They should match. If they don't, then the current request is classified 
as an 'out of order' or duplicate request. The action object can change 
the request's action to something else, if it is thought that duplicating
the 
action in question might be harmful.
4. The request is forwarded to the corresponding JSP page.
5. Code on the JSP page extracts the token from the session, and makes it 
the value of a hidden form field.
6. If the page and its form are subsequently submitted, the token value will
be 
submitted as part of the request. The loop begins again from step 1. The
token
submitted here in step 6 will be compared in step 3.

This seems to work well for detecting duplicate requests resulting from the
user hitting
the reload/back or forward buttons on the browser.

Then we tried to apply the same approach to a framed application. The
problem with 
a framed application is that each user action can result in a number of
requests, 
hence we can't assume that an in order request's token value should match
the 
last one generated but one.

A colleague came up with a solution for this. Instead of just getting the
pages to submit
whatever value they pick up from the session at time of rendering, we get
each page 
to store the value extracted from the session at the time of rendering in a
JavaScript
global variable, or one on the top level window. Then, at time of
submission, the page
picks up this value from the JavaScript, and submits this. The rest of the
process 
should work as before. The important point here is that this JavaScript
variable is 
shared by all requests, and thus, we effectively end up with one token
identifying
each user action, rather than one for each request. All of the requests from
a single
user action should be submitted with the same token value.

This seemed to work fine in both Internet Explorer 6.0 and Netscape 6.2.
Then I 
discovered one problem. In a particular test case, I would get the
application to 
carry out a Struts forward action to the page containing the frameset
containing
the pages in question. Then, I would invoke an action on one of those pages
to see
whether the application thought such a request was a duplicate or not. It
should not.
Generally it did not. However, about 1 in every 10 times, with Internet
Explorer only,
the tokens would not match, and it would come up with a false positive. It
would
classify the first instance of a request as a duplicate.

Has anyone else seen this sort of behavior? It seems to be something
peculiar to the combination of a Struts forward to a frameset followed by 
the action in question, when using IE only. Is is possible that this is
occuring
due to some sort of race condition?

Any ideas welcome.
Thanks,
Vaughan.
___
Vaughan Jackson
Development 
Tumbleweed Communications
[EMAIL PROTECTED] / +1 (650) 216 2532
___



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




AW: AW: Struts and Frames

2001-07-27 Thread Andreas Leitner



 -Ursprüngliche Nachricht-
 Von: Matthias Bauer [mailto:[EMAIL PROTECTED]] 
 Gesendet: Freitag, 27. Juli 2001 07:47
 An: [EMAIL PROTECTED]
 Betreff: Re: AW: Struts and Frames
 
 
 Andreas,
 
 in the application we are currently developing we have a 
 similar problem:
 
 We have three frames from which either only the frame the 
 user is currently 
 clicking a button in has to be reloaded or some other frames 
 need to be 
 refreshed as well.
 
 What we are doing is pretty simple:
 The request action updates the user's session state and 
 forwards to the frameset 
 or the single frame. In case a frame is sent back, we just 
 return this frame, 
 otherwise we return the whole frameset. The browser then 
 requests the single 
 frames from the webserver which are delivered based on the 
 user's session state.
 
 We do not need any JavaScript for this. The only drawback is: 
 You need to 
 specify in the target of the link/form if the whole frameset 
 or only the single 
 frame needs to be updated, because the browser does the 
 refresh on the client 
 side. As a consequence you can not decided whether to update 
 only the single 
 frame or the whole frameset based on the request parameter 
 that are sent along.
 

Hmm, I see. Thanks for your answere. Have you tackeled the back-button
resp. history problem yet? If we store the request data not in the
request, but in the session the back-button becomes close to useless.
Same for bookmarking. Although the web-app could with some work provide
it's own means of history.


Andreas




Struts and Frames

2001-07-26 Thread Andreas Leitner


I would like to use Stuts together with HTML frames. Are there any tag
libraries available?

Has anybody done that before? Has anybody had good/bad experience with
it?


Tia,
Andreas




Re: Struts and Frames

2001-07-26 Thread Peter Alfors

The struts tags have a target attribute that you may set to point to the
desired frame.
Since the target is actually handled by the browser (as where to display
the results), there isn't really much handling to be done by struts.
Our site has 3 frames within a frameset.  We have not experienced any
problems.
However, we are also not moving in and out of the frames.
I guess it may prove a little more difficult if you want to go from a
frameset to a single frame, then back to a frameset with dynamically
specified pages.  Even so, this is not really a struts issue, but more of
an app design issue.

Pete

Andreas Leitner wrote:

 I would like to use Stuts together with HTML frames. Are there any tag
 libraries available?

 Has anybody done that before? Has anybody had good/bad experience with
 it?

 Tia,
 Andreas


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



AW: Struts and Frames

2001-07-26 Thread Andreas Leitner



 -Ursprüngliche Nachricht-
 Von: Peter Alfors [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 26. Juli 2001 15:54
 An: [EMAIL PROTECTED]
 Betreff: Re: Struts and Frames
 
 
 The struts tags have a target attribute that you may set to
 point to the desired frame. Since the target is actually 
 handled by the browser (as where to display the results), 
 there isn't really much handling to be done by struts. Our 
 site has 3 frames within a frameset.  We have not experienced 
 any problems. However, we are also not moving in and out of 
 the frames. I guess it may prove a little more difficult if 
 you want to go from a frameset to a single frame, then back 
 to a frameset with dynamically specified pages.  Even so, 
 this is not really a struts issue, but more of an app design issue.

Thanks for your answere Peter. Meanwhile I have been thinking and
prototyping the Frames idea a bit more through. One thing I would like
to have is that only those frames get updated, that really need to. But
a get/post always only updates one window. So I have been thinking about
the following design:

The top level frameset consists of a frame for the actual page
(NonHidden) and a hidden frame (Hidden). In NonHidden there might
be other arbitrarily deep nested frames and framesets. Whenever
something happens (a get or post) the action mapping triggers the right
functions to change the buisness objects and the always forwards to the
same servlet. The target of each and every post/get will be Hidden. The
servlet that is activated by each action, does not produce any code to
display, but instead it has a JavaScript onLoad feature, that will
reload every frame that needs to be changed. The list of frames that
need to be reloaded are determinded at runtime (not sure how this will
be implemented). Anyway the key is to put the Document (from the
Document/View pattern) always into the session. If there is a view to
display a menu, the session will have a Menu attribute. It is this
attribute that the actions change if they need to and is this attribute
the views read to produce HTML.

Does that design strike anyone with a little more experience in web app
design? (; One obvious drawback is that the browsers back button would
not work, because it will not change the Document attributes in the
session scope.


Tia,
Andreas




Re: AW: Struts and Frames

2001-07-26 Thread Matthias Bauer

Andreas,

in the application we are currently developing we have a similar problem:

We have three frames from which either only the frame the user is currently 
clicking a button in has to be reloaded or some other frames need to be 
refreshed as well.

What we are doing is pretty simple:
The request action updates the user's session state and forwards to the frameset 
or the single frame. In case a frame is sent back, we just return this frame, 
otherwise we return the whole frameset. The browser then requests the single 
frames from the webserver which are delivered based on the user's session state.

We do not need any JavaScript for this. The only drawback is: You need to 
specify in the target of the link/form if the whole frameset or only the single 
frame needs to be updated, because the browser does the refresh on the client 
side. As a consequence you can not decided whether to update only the single 
frame or the whole frameset based on the request parameter that are sent along.

--- Matthias


Andreas Leitner wrote:

 
-Ursprüngliche Nachricht-
Von: Peter Alfors [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 26. Juli 2001 15:54
An: [EMAIL PROTECTED]
Betreff: Re: Struts and Frames


The struts tags have a target attribute that you may set to
point to the desired frame. Since the target is actually 
handled by the browser (as where to display the results), 
there isn't really much handling to be done by struts. Our 
site has 3 frames within a frameset.  We have not experienced 
any problems. However, we are also not moving in and out of 
the frames. I guess it may prove a little more difficult if 
you want to go from a frameset to a single frame, then back 
to a frameset with dynamically specified pages.  Even so, 
this is not really a struts issue, but more of an app design issue.

 
 Thanks for your answere Peter. Meanwhile I have been thinking and
 prototyping the Frames idea a bit more through. One thing I would like
 to have is that only those frames get updated, that really need to. But
 a get/post always only updates one window. So I have been thinking about
 the following design:
 
 The top level frameset consists of a frame for the actual page
 (NonHidden) and a hidden frame (Hidden). In NonHidden there might
 be other arbitrarily deep nested frames and framesets. Whenever
 something happens (a get or post) the action mapping triggers the right
 functions to change the buisness objects and the always forwards to the
 same servlet. The target of each and every post/get will be Hidden. The
 servlet that is activated by each action, does not produce any code to
 display, but instead it has a JavaScript onLoad feature, that will
 reload every frame that needs to be changed. The list of frames that
 need to be reloaded are determinded at runtime (not sure how this will
 be implemented). Anyway the key is to put the Document (from the
 Document/View pattern) always into the session. If there is a view to
 display a menu, the session will have a Menu attribute. It is this
 attribute that the actions change if they need to and is this attribute
 the views read to produce HTML.
 
 Does that design strike anyone with a little more experience in web app
 design? (; One obvious drawback is that the browsers back button would
 not work, because it will not change the Document attributes in the
 session scope.
 
 
 Tia,
 Andreas
 






Struts and Frames

2001-02-14 Thread James Howe

I'm working to build a web based application using Struts.  Currently we 
have a mocked-up prototype which uses frames (iframes in particular) to 
control what gets displayed on the screen.  In general the format of our or 
pages consists of three frames:

Top (header/navigation stuff)
Main (the thing the user is currently doing)
Footer

I've tried to "strutsifiy" this prototype but I haven't quite figured out 
the best way to handle things.  The one thing I did was convert the footer 
from "footer.html" to "footer.jsp".  This lets me dynamically change the 
content of the footer.  This seems to work.  I then tried to modify the 
main body.  I started by making the main body point to my "logon.do" 
action.  This worked fine.  The screen came up and my logon stuff was in 
the middle frame.  However, once the user logged on, my middle pane went 
blank.  In my config, I had the logon page forward to my success action, 
but my success action never displayed.  Is there anything special I need to 
do to make my struts application usable in a framed environment?

Thanks!




AW: Struts and Frames

2001-02-14 Thread oliver . lauer

No, I guess not. We make heavy use of framesets and frames and we did not
config anything special.

You should use the target-property of your form in the logon.jsp to point
the result to the frame you came from.

Oliver

-- Original Nachricht --

I'm working to build a web based application using Struts.  Currently we

have a mocked-up prototype which uses frames (iframes in particular) to

control what gets displayed on the screen.  In general the format of our
or
pages consists of three frames:

Top (header/navigation stuff)
Main (the thing the user is currently doing)
Footer

I've tried to "strutsifiy" this prototype but I haven't quite figured out

the best way to handle things.  The one thing I did was convert the footer

from "footer.html" to "footer.jsp".  This lets me dynamically change the

content of the footer.  This seems to work.  I then tried to modify the

main body.  I started by making the main body point to my "logon.do"
action.  This worked fine.  The screen came up and my logon stuff was in

the middle frame.  However, once the user logged on, my middle pane went

blank.  In my config, I had the logon page forward to my success action,

but my success action never displayed.  Is there anything special I need
to
do to make my struts application usable in a framed environment?

Thanks!