• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Tiles Question

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am using Struts Tiles in my project.
Project has Header,Menu(Left Navigation containing hyperlinks),and body.

I want display particular JSP page when user clicks on navigation hyperlinks. means only Body should be changed .

Please give information regarding this problem.

Also whether we have to use ForwardAction or separate Action classes for each hyperlinks ?

Thanks
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use frames, iframes, or even ajax to load only the body part of the page.

If you don't need to do any business logic to load a page when a hyperlink is clicked you can just use a ForwardAction. Otherwise, you should use an ordinary action class.
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Each tile is its own JSP.

1.) Each link can be its own action, forwarding to its own JSP.

2.) Each link can be a link to a dispatch action with a unique argument to display particular content on a JSP that is forwarded to.

Personally I usually do the second. I create a dynamic content link, which I pass a variable. I then have the action query the database to inject specific content into a JSP, or pull a whole JSP and push it back through the response. That way I can edit the content without redeployment.
 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic