• Post Reply Bookmark Topic Watch Topic
  • New Topic

Static Include files in servlet

 
Sid Scud
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone...
I have a very basic question....
I have worked i Jsp and to static include a file we use the syntax..<%@include file="xyz.html"%>.
How can it be done in servlets?
Thanks in advance
-sid
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Siddharth Oak:
I have worked i Jsp and to static include a file we use the syntax..<%@include file="xyz.html"%>.
How can it be done in servlets?

It can't. Remember how a JSP works -- the JSP engine servlet (1) turns your JSP file in a .java file, then (2) compiles that into a servlet. The static include is handled in step (1). But for servlets, there is no step (1).
If you use make or ant files, nothing stops you from using cpp, the C preprocessor, though
- Peter

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!