Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java jsp:包含在netbeans中_Java_Jsp_Jsf_Netbeans_Jspinclude - Fatal编程技术网

Java jsp:包含在netbeans中

Java jsp:包含在netbeans中,java,jsp,jsf,netbeans,jspinclude,Java,Jsp,Jsf,Netbeans,Jspinclude,我在NetBeans中使用JSF。我只想在另一个页面中包含一个页面。但是无论我尝试了什么,当我运行主页时,我没有得到任何错误,但是我无法在主页中看到我包含的页面。为什么? 我的主页是: <jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page"

我在NetBeans中使用JSF。我只想在另一个页面中包含一个页面。但是无论我尝试了什么,当我运行主页时,我没有得到任何错误,但是我无法在主页中看到我包含的页面。为什么?

我的主页是:

<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:webuijsf="http://www.sun.com/webui/webuijsf">

<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
    <webuijsf:page id="page1">
        <webuijsf:html id="html1">
            <webuijsf:head id="head1">
                <webuijsf:link id="link1" url="/css/front.css"/>
                <webuijsf:script id="script1" url="/scripts/front2.js"/>
                <webuijsf:link url="favicon.ico" rel="shortcut icon" type="image/x-icon"/>
            </webuijsf:head>
            <webuijsf:body id="body1" style="-rave-layout: grid">
                <webuijsf:form id="form1">

                        <!-- This is where I include my page -->
                        <f:subview id="nav">
            <jsp:include page="frontsitemenu.jsp" />
                        </f:subview>


              </webuijsf:form>
            </webuijsf:body>
        </webuijsf:html>
    </webuijsf:page>
</f:view>

我的附页是:

<f:subview id="frontsitemenu">
    <f:verbatim>
        <p>rrrrrrrrrrrrrrrrrr</p>
    </f:verbatim>
</f:subview>

rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr


我相信您的include页面,
frontsitemenu.jsp
,在计算您包含的jsp并将结果插入结果时,需要具有所有标准标题

您是否从浏览器查看结果网页上的源代码

尝试将此添加到您的
frontsitemenu.jsp

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>   
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>