The jsp:include is not a compile time directive the <[EMAIL PROTECTED]%> is a
compile time directive..That is why u r seeing the problems...import the
classes in the included .jsp and the errors will vanish...

hth,
A


> Hi,
> I'm trying to use the jsp:include directive to include a JSP file into a
> JSP file.
>
> The included JSP file requires objects both from java and from my own
> codebase.  It seems that the JSP engine is attempting to compile the JSP
> to be included *separately* from the including JSP.  Thus, because I
> can't do an import at the top of the included JSP file, I'm getting
> compile time errors.
>
> Here's some code snippets to help make this clear:
>
> The header and include directive of the first JSP:
>
> <%@ page info="Test"
>  import="java.util.Hashtable,server.DateProcessor;"
>     errorPage="/jsp/Operations/OperationError.jsp" %>
> <jsp:useBean id="systemBean" scope="session"
>  class="beans.SystemBean" />
> <jsp:useBean id="userBean" scope="session"
>  class="beans.UserBean" />
> <jsp:useBean id="userSessionBean" scope="session"
>  class="beans.UserSessionBean" />
> ....
> <jsp:include page="/jsp/Operations/_Date.jsp" flush="true"/>
> ....
>
>
> Here's the code in the included JSP:
>
> <%
>  DateProcessor date = new DateProcessor();
>  Hashtable months = date.getMonths();
>  Hashtable daysOfWeek = date.getDaysOfWeek();
> %>
>
> I get compile time errors on DateProcessor and Hashtable.
>
> Please respond to me at [EMAIL PROTECTED] as well as the list as I
> get the digest version.  Thanks!!!!!
>
> Beth
>
>
> --
> -<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-
> Elisabeth M. Freeman               Phone: 203.773.9422.111
> Mirror Worlds Technologies           Fax: 435.304.3172
>       Web: http://www.mirrorworlds.com/
> Home Page: http://www.cs.yale.edu/~freeman-elisabeth.html
> -<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to