• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about jsp:include causing duplicated tags like head,meta

 
Tianpeng Xia
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi , everyone.
Just got stuck here. when i use jsp:include to include header.jsp and footer.jsp into my index page, in firefox's source view, i notice the body,head, meta tags are duplicated for 3 times.

Can I just remove the duplicated ones and only keep the head tags<html> and<body> in the header.jsp, and keep </html>and </body> tags in the footer.jsp?
THANKS!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
378
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edit the files to remove the extra tags. Seriously, those tags were created (presumably by an IDE using a wizard) when creating those JSPs. jsp:include is including literal text. It isn't adding extra tags.

Which is good. Because you only have to remove the tags once and you are done.
 
Tianpeng Xia
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks! Jeanne
 
Sumit Patil
Ranch Hand
Posts: 296
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This time it was Jeanne and not Bear, answering the question :)
Edit :- Oops...you changed the name... thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic