"Zia, Asad" wrote:

> I am including the taglib URIs in the include file. The page comes up, with
> the tags unprocessed. When I view the source of the page, the tags appear
> unprocessed as text.
>
> This is my include file:
>
> //header.jsp
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> <h2>Hello!</h2>
>
> This is my JSP:
> //welcome.jsp
> <jsp:include page="include/header.jsp"/>

Using <jsp:include> in this way causes a completely separate request to the
"include/header.jsp" page.  What you want is to use the include *directive*
instead:

    <%@ include file="include/header.jsp" %>

which is processed as your welcome.jsp page is compiled, just like an "#include"
directive in a C program.

>
> <html:img page="/images/welcome.gif" height="105" width="625" alt="Welcome
> image"/>
>
> This image does not load in the page but Hello! appears. When I view the
> source, this img tag is described explicitly i.e.
> <html:img page="/images/welcome.gif" height="105" width="625" alt="Welcome
> image"/>
>
> Thus my include file is found and loaded without errors, but does not
> resolve the taglib URI, without reporting errors. Any suggestion will help!
>
> Thanks
>
> Asad
>

Craig


Reply via email to