• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

jsp:include Vs include directive

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic