• 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

what are the total ways to include?

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are the total ways to include one jsp file into another jsp?

Thanks.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm, for example:

<%@ include file="additional_file.jsp" %>

or

<jsp:include page="any_page.jsp" />

:roll:

Natasza
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i would like to add few points to Natasza Biecek's reply

<%@ include file="additional_file.jsp" %> is called as directive include ,
or static include .this is used to include static content such as headers to your pages that are not expected to change .since it may be loaded from cache memory on subsequent pages.

<jsp:include page="any_page.jsp" /> is called as dynamic include .this is used to include dynamic content which changes frequently and must always be up to date
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rathi ji:
What are the total ways to include one jsp file into another jsp?

Thanks.



What is your answer?
Normally, I would assume that this is a homework question and close the thread but you've been here too long and made too many posts to still be in a JSP class.

What are you trying to acomplish with such a short question that requires a long answer?
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ben Souther:


What is your answer?
Normally, I would assume that this is a homework question and close the thread but you've been here too long and made too many posts to still be in a JSP class.

What are you trying to acomplish with such a short question that requires a long answer?



Sorry Ben. Actually I just don't remember all the includes (directive and action then static and dynamic etc) so instead of looking at book I asked here. Sorry again.

Thanks Natasza and pradheesh for answers. It clears me.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see
http://faq.javaranch.com/view?IncludesActionDirective

Also, the JSTL spec provides some additional ways to do this.
A link to the spec can be found in the JSP FAQ as well.
reply
    Bookmark Topic Watch Topic
  • New Topic