This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes Construcing a JSP via JSP:include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Construcing a JSP via JSP:include" Watch "Construcing a JSP via JSP:include" New topic
Author

Construcing a JSP via JSP:include

Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Hi guys,

I just wanted to know if I should be using JSP include to piece together pages? I find it's fine, but does become cumbersome if you are piecing togther a lot of pages together.

My question, is there a better way of doing what I do, as I have alot of repeated items in each page I have.

Thanks in advance,
Zein
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61314
    
  66

As of JSP 2.0, tag files are a much better mechanism than include. Especially if data is going to be shared between the main page and the sub-pages.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Thanks Bear,

Are tage files Tag Libraries?
Any ideas where I can get more inf/tutorials on tag files.

Thanks for your help
Zein
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61314
    
  66

There's a link to the JSP 2.0 Specification in the JSP FAQ.

Basically, tag files are a means to easily create custom actions (tags) using JSP files rather than Java classes.
Daniel Amadei
Ranch Hand

Joined: Mar 29, 2005
Posts: 94
Try Tiles

I believe it does what you want to do in a elegant way.

Daniel
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61314
    
  66

Originally posted by Daniel Amadei:
Try Tiles


Ummm, well, I'd advise against adopting something so horribly over-complicated for something so very simple.
Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Cheers guys,
Thanks for your help, I'll look into it.

Regard
Zein
 
GeeCON Prague 2014
 
subject: Construcing a JSP via JSP:include