Hi,
The path for the file foo.jsp may not be found.Thats why it gives an error, page
attribute has no value.Try giving
<%@ include file="/foo.jsp" %>
if it is the same dir or the relative path from the current dir.
Hope this helps.
Johnson Jeffrey wrote:
> Hi,
>
> I'm new to this JSP stuff and I have a question.
>
> I'm trying to get the include.jsp example from the jswdk-1.0 to run. If I
> run examples/jsp/include/foo.jsp, it works correctly and displays the
> System.currentTimeMillis() correctly. However, when I run
> examples/jsp/include/include.jsp (which tries to include the results from
> one JSP in another JSP file) I get the error: Error getting compiled page.
> 23,10: Attribute page has no value. I'm running WebSphere App Server 2.02.
> Lastly, this is the code from the include.jsp file:
>
> <html>
> <!--
> Copyright (c) 1999 Sun Microsystems, Inc. All Rights Reserved.
>
> This software is the confidential and proprietary information of Sun
> Microsystems, Inc. ("Confidential Information"). You shall not
> disclose such Confidential Information and shall use it only in
> accordance with the terms of the license agreement you entered into
> with Sun.
>
> SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
> SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
> IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
> PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
> SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
> THIS SOFTWARE OR ITS DERIVATIVES.
> -->
>
> <body bgcolor="white">
>
> <font color="red">
>
> <%@ page buffer="5" autoFlush="false" %>
>
> <p>In place evaluation of another JSP which gives you the current time:
>
> <%@ include file="/jsp/include/foo.jsp" %>
>
> <p>To get the current time in ms by including the output of another JSP:
>
> <jsp:include page="/jsp/include/foo.jsp"/>
>
> </html>
>
> My intention is to eventually have a .jsp file that will resolve to my
> navigation bar. I would like to "include" this .jsp in each of my .jsp
> pages.
> If anyone has done this before, I would like to hear from you. I
> appreciate any input.
>
> Thanks in advance for your help!
>
> Jeff
>
> ===========================================================================
> 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