Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp directive include vs jsp action include?

 
andy armstrong
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the advantage/disadvantages of
using either one..
Why use one over the other?
 
Christian Dadulla
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"jsp directive include vs jsp action include"

try this link >>
http://java.sun.com/products/jsp/syntax/1.0/syntaxref10.fm11.html
** better use jsp action include if you're not sure of the page you're trying to include if it's a static or dynamic file.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It really depends on what kind of result you want on the page...
A static include (<%@ include...) will include the source code of the included page verbatim in the source code of the including page. So you'll actually be able to access variables defined within one, in the other.
A dynamic include (jsp:include...) will include the output of the included page in the output of the including page. In this version -- you can't access variables between the included and including pages.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic