Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic