Do you recommend using frames with struts?


Web tier: servlets, JSP, Web frameworks: Do you recommend using frames with struts?

  1. Do you recommend using frames with struts? (5 messages)

    Hi, I'm starting a j2ee development with struts helping in presentation layer.
    Do you recommend using frames to display multiple sections of data within the application?
    What are the (dis)advantages of using it?

    Thanks in advance,

    Nicolas Dobler
    Santa Fe - Argentina
  2. There are some advantages, but one of the major disadvantages is, after you login to your system and if you try to refresh using the refresh button, you are gone, it will take you to your first screen or whatever you see on the URL bar.
  3. We ended up with a frame-based main window in the prototype web-app for my current project (the left frame contained a heavy javascript based tree sructure we didn't want to re-load to often), though I ran into some trouble when trying to re-load the other frames.

    Personally, I will look into using the Tiles framework when re-making the layout for the application. See and look for chapter 11. Perhaps Tiles includes the functionality we need from frames?
  4. I recommend AGAINST using frames with Struts. One issue is that you actually can't use frames effectively. Once you define the frame set, the browser then examines the links in the frame set and retrieves the frame files. You actually lose the session and any context parameters when the browser does this. As such, for any actual work you want to application to do, you either have to link to your action into the target frame, so that only that frame changes, and the action can forward directly to the JSP (otherwise, you lose all attributes you put in the request). If you want to change 2 frames at once, you basically have to use a javascript hack to make the loading of one frame cause the other to change as well.

    I'd suggest taking a look at some of the CSS-based layouts here:

    In general, you'll find that almost any frame-like layout can be created in a cross-browser compatible format using CSS. I recommend using/modifying a pre-written layout rather than attempting to author this yourself. In such a layout, you can safely use Tiles and avoid many of the headaches that Struts+frames can cause.
  5. hi,

     this the html :

    a href="<bean:write name="employe"
     property="username" />">Edit</a>

    i need it in Tag Lib

  6. And what about IFrames?