• 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

Use <s:url> or use <jsp:include>

 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone, I am new and interested in Struts 2, apologize that perhaps I should do more research it myself. But if anyone can offer any opinions, it would be awesome.

If I want to like include company banner on my app and maybe inherit the style from company site by writing or pasting the least amount of code, should I use <s:url> or should I use <jsp:include> ?

by the way, where should I place the included file to be consider the best practice in modern Web Application. My initial guess is a subfolder under /WEB_INF/

thanks for the input
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you're misunderstanding the use of the s:url tag. This tag does nothing more than create a variable that is a formatted URL that could then be used by some other tag or scriptlet. It doesn't actually include any content on the page. If you want to include something on each page, then a jsp:include would work. You also have the option of using Struts Tiles.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic