File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes include tag ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "include tag ???" Watch "include tag ???" New topic

include tag ???

Naresh Babu

Joined: Mar 20, 2001
Posts: 29
can we include a servlet class in a jsp using include tag
just as we can include another jsp or html file.
vaibhav punekar
Ranch Hand

Joined: Jan 20, 2001
Posts: 134
i think we can not include dynamic part using "include tag".I may wrong in saying this.Please correct me if so.But as I remember we can include static pages only.So if your servlet has no "dynamic part" there should be no problem.Else you will have to import servlet class and use it wherever you want by instanciating it.Am I right?Please correct me if I m wrong.

Phil Hanna
Ranch Hand

Joined: Apr 05, 2001
Posts: 118
With <jsp:include>, yes. With <%@ include %>, no.
Phil Hanna
Author of :
JSP: The Complete Reference
Instant Java Servlets

Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="" TARGET=_blank rel="nofollow">Instant Java Servlets</A>
I agree. Here's the link:
subject: include tag ???
It's not a secret anymore!