This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are include files in jsp?

 
ernest fakudze
Ranch Hand
Posts: 216
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen some jsp code which include a .inc file like
<%@ include file ="xxx.inc" %>
What are include files?
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "Include" directive is used to include output from other sources such as HTML, JSP, etc. during page translation time, into the output of your JSP page. A Typical example is web sites that have the same header/footer on all pages. Instead of having the same HTML on all pages, that common information can be extracted into a file and then "included" in the resulting JSP at translation time.

------------------
Bosun
SCJP for the Java� 2 Platform
 
ernest fakudze
Ranch Hand
Posts: 216
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bosun but here is my real problem: with the include directive a programmer can either include .jsp, .html and .inc files types. Now I know what jsp and html files are but what type of a file is an inc file e.g. fileName.inc. Does it get translated, compiled or anything else? Could we convert a .inc file to a jsp without any problems.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whatever file you include using <%@include %> becomes part of the .jsp itself. And the .jsp is translated. The type of the included file is completely irrelevant.
- Peter
 
ernest fakudze
Ranch Hand
Posts: 216
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for clarifying that one to me. Really appreciate it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic