• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to maintain header JSP?  RSS feed

 
sumanth kumar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, so far we drive LDAP attributes from LDAP to a JSP and displaying with attribute values (driving dynamically from property files ). Now we got to show some attributes as header (fixed), and some vary depending unpon the page request. Now I want to fix the header with those fixed attributes and remaining attributes will be in another page, so that we can add them together. What is the way to add JSPs? or suggest me another way to maintain those fixed attributes to be displayed for every page.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could simply use JSP includes, or write a custom tag, or use a tool such as Tiles or SiteMesh.
 
Shashank Ag
Ranch Hand
Posts: 88
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just elaborating Bear here for jsp includes approach:
First write a jsp file for header say header.jsp placed in folder "head"
Now in all other jsp files use:

<jsp:include file="/head/hearder.jsp" />

The jsp:include will be simply replaced by contents of header.jsp at runtime.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Subhash Gowda,
Your post was moved to a new topic.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!