File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts and Frames Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts and Frames" Watch "Struts and Frames" New topic
Author

Struts and Frames

Jag Bains
Ranch Hand

Joined: Nov 19, 2002
Posts: 39
hi,
I have a problem with accessing beans from within jsp pages when they are in frames.
For example, I have a login.jsp which allows a user to login. If sucessfull, it returns a list of menu items. If the resulting page from the login.jsp is a simple page i.e. maintenanceMenu.jsp, then all works fine.
However, if the resulting page is a frame i.e maintenanceFrame.jsp and one of the frames is maintenanceMenu.jsp, then I get the following error.

maintenanceFrame.jsp is

maintenanceMenu.jsp is

Has anyone got any ideas what I am doing wrong?
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
For all intents you can think of each frame as a separate browser instance. That is, each frame requires its own request-response cycle to interact with the server. Because you are storing your bean in request scope, it will only be available to the targetted frame. If you have something that must be rad by multiple frames, you will want to use session scope.
IMHO though, the best strategy is to avoid frames when possible. Templating strategies make it simple enough to include common elements (such as menus) on multiple pages without using frames, making it rare when they are actually needed.
Jag Bains
Ranch Hand

Joined: Nov 19, 2002
Posts: 39
Templates work a treat.
Thanks
Jag
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts and Frames