File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what are the total ways to include?

 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the total ways to include one jsp file into another jsp?

Thanks.
 
Natasza Biecek
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm, for example:

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

or

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

:roll:

Natasza
 
pradheesh manohar
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • 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: 3830
  • 0
  • Mark post as helpful
  • send pies
  • 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 Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic