This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSF and the fly likes jsp:include in JSF JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "jsp:include in JSF JSP" Watch "jsp:include in JSF JSP" New topic

jsp:include in JSF JSP

Sajan Patel
Ranch Hand

Joined: Oct 25, 2004
Posts: 77
Hello there,
I have two jsp and would like to include one jsp in Another

includeJSP is included in BaseJSP.jsp. Base JSP has form and include JSP has Command Link to submitForm. currently, If I hit Submit button than browser start spinning but never reach to #{action.method} (In another word I can say it submitting form) and come back to same page with no h:messages. I am just wondering here is this possible or I am just wasteing my time and your too.

Thanks in Advance
Sajan Patel
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
I have done it like this in the past and it works for me.

MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Denise Smith
Ranch Hand

Joined: Jul 26, 2005
Posts: 36
I use the jsp include but the base page is never in a subview only the included page is..

here is the base page code with the include in a tr
<TD valign="top">
<jsp:include page="/nav.jsp" flush="false"></jsp:include>

then the included page:

<f:subview id="ch">

<hx:scriptCollector id="scriptCollector1" preRender="#{pc_Ch.onPageLoadBegin}">
<h:form styleClass="form" id="form1


Surround yourself with learners...They will educate you!
Sajan Patel
Ranch Hand

Joined: Oct 25, 2004
Posts: 77
Yup!! Its working now when I removed subView from main page.
I agree. Here's the link:
subject: jsp:include in JSF JSP
jQuery in Action, 3rd edition