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:include Vs include directive

 
Rishi Yagnik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
i am trying following exmaple .....
<jsp:include page="login.html"/>
if loginpage does not found it don't give me any errors.......
but when i try this
<%@include page="login.html"%>
if page not found it gives me error why is page not found .......
why it does not give me any error while using jsp:include
pls let me know the behaviour for both the case
thanks in advance
Rishi
 
ted oniger
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Rishi,
The Include Directive (static inclusion) has only one attribute (i.e. file) while Include Action (dynamic inclusion) has two attributes: page and flush. It appears that you've used the attribute page in both, that's why you're getting a translation error. Try this:
<jsp:include page='login.html'/>
<%@include file='login.html' %>
Let me know how it goes.
--Ted
pageflush
 
bor
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rishi,
The inlucde directive will resolve the path during the transition time. That's the reason why it gets error even using the right attribute name "file" in include directive element.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic