File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Problem in Include File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in Include File" Watch "Problem in Include File" New topic

Problem in Include File

vasu devan
Ranch Hand

Joined: Apr 14, 2005
Posts: 38
Dear Friends,

I have some peculiar Problem, and not able to find Solution,here is the probelom

I am Using j2ee Application which is deployed in Websphere,Most of the Pages i used Include tag to include some static JSP files

<%@taglib uri="/WEB-INF/classes/com/netcast/tags/NC_CustomTags.tld" prefix="nctTags" %>
<nctTags:body />

above is the code is available in IncludeFiles/NC_CustomTagInc.jsp

When i called the above page using Following tag in Main jsp file

<%@include file="../IncludeFiles/NC_CustomTagInc.jsp" %>

Its not Working

instead i replaced the Include file Code into main JSP,its working fine

Is there any probelom around

The same Application working fine for Resin 3.0.14 , Tomcat 5.0.28

Any Help is Highly appreciated

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

The include directive is used to include static content.
I think you should try to use <jsp:include> instead.

[My Blog]
All roads lead to JavaRanch
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Satou kurinosuke:
The include directive is used to include static content.
I think you should try to use <jsp:include> instead.

include directive is not for static content we can inculde jsp pages using this. But this would be a static include, means the page would be included at compile time. On the other hand jsp include is a dynamic include and the page is included at runtime.
I agree. Here's the link:
subject: Problem in Include File