• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic