• 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 2 Tiles

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys, Just wanna double check if i am doing things right.

I am using struts 2 tiles to manage the view.
This code is actually working.

Just that am not really sure on what approach should be used or if i am doing things right. But according to some examples i read this is how they do it.

Just double checking before committing the project. Because if in long run maintainance will be a problem , i'll definitely be in trouble.

Thank You for your suggestions and comments in advance!

Here's my code:

My layout.jsp


My header.jsp


My login.jsp


heres my tiles.xml


 
Neil Muya
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there like an include element in tiles.xml that can lessen the codes?

because if it's a big project tiles.xml

will definitely bring lots of block of codes....

Thanks Again!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could also consider using plain old JSP templating.

It seems fine; although you're probably creating invalid HTML by repeating the <html>, <head>, and <body> tags.
 
I'm not dead! I feel happy! I'd like to go for a walk! I'll even read a 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