Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF include

554713Jan 25 2008 — edited Jan 25 2008
I'm (again) trying to get to grips with SOA in general, let alone Fusion specifically, and I'm having difficulty doing a fairly simple thing.

I'm running JDeveloper 11g preview 3 with its embedded oc4j. I've installed whatever the current release of XE is as the backing database.

I can get a simple single "hello world" page to deploy and work but can't get a page to include another page.

I have a header page 'header.jsp';

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>

<f:view>
<h:outputFormat value="Hello World; I\'m the common included bit"/>
</f:view>

Then a page to look at;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>
<f:view>
<f:subview id="headerPane">
<%@ include file="/header.jsp"%>
</f:subview>
<h:outputFormat value="Hello World; I\'m the page specific bit."/>
</f:view>

The actual include is a handwritten attempt- the one created by the IDE was

<jsp:include page="/header.jsp" flush="true"/>

Both fail in the same way.

When I deploy the app, JDeveloper generates no errors and I can see the two jsp files have been placed on the server along with the .java and class files. However on running I just get

500 Internal Server Error

Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.


The exception output is huge, but what looks to be the relevant bits are

25-Jan-2008 07:48:29 oracle.security.jps.fmw.util.JpsFmwUtil findSystemUser
WARNING: findSystemUser: System user is not available from Credential Store.
25-Jan-2008 07:49:44 oracle.security.jazn.oc4j.JAZNFilter doFilter
WARNING: javax.servlet.jsp.JspException: Can't write content above <f:view> tag InValid to flush BodyContent: no backing stream behind it
javax.servlet.jsp.JspException: Can't write content above <f:view> tag InValid to flush BodyContent: no backing stream behind it
at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:172)
at page1.ctru2_helper_4(_page1.java:181)
at page1.ctru1_helper_2(_page1.java:153)
.
.
.
.
25-Jan-2008 07:49:45 oracle.security.jazn.oc4j.JAZNFilter doFilter
WARNING: Error in servlet
javax.servlet.jsp.JspException: Can't write content above <f:view> tag InValid to flush BodyContent: no backing stream behind it
at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:172)
at page1.ctru2_helper_4(_page1.java:181)
at page1.ctru1_helper_2(_page1.java:153)
at page1.ctru0_helper_1(_page1.java:107)
at page1.jspService(_page1.java:61)



Anyone know what I'm doing wrong?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2008
Added on Jan 25 2008
1 comment
2,326 views