2009-06-24 9 views
0

NetBeansでJSFを使用しています。私がしたいのは、別のページにページを含めることだけです。しかし、何を試しても、メインページを走らせるとエラーは出ませんが、メインページには私のページが表示されません。どうして?jsp:netbeansに含める

私のメインページは次のとおりです。

<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> 

マイ含まれるページがある:私はあなたがページ、frontsitemenu.jspが含ま

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

答えて

1

信じている、などの標準ヘッダのすべてを持っている必要がありますインクルードするjspが評価され、結果が結果に挿入されます。

ブラウザから結果のWebページにソースを表示しましたか?

あなたfrontsitemenu.jspにこれを追加してみてください:

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> 
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> 
関連する問題