• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Struts and Frames

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Templates work a treat.
Thanks
Jag
 
Your mother is a hamster and your father smells of tiny ads!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic