Including a jsf page into simple jsp

hey i m including a xhtml i.e facelet into an jsp file.till this scenarion it is working fine but when i am including that page into another jsp page it is not showing the correct representation of the jsf components

I know it is frustrating to have a problem, but read your own question and ask yourself this: can anybody help me with the information I am giving here? I hope you can reason for yourself that this is simply not true, no matter how much you want it to be.
You'll have to dig deeper yourself until you can either solve it, or unearth more information that might allow people to help you.

Similar Messages

  • Importing visual jsf page into another jsp page

    Hi
    I am developing a web application using jsp and struts. I want to embed a visual jsf page that Ive created into another jsp page (which is a normal jsp page, not a jsf one.)
    Ive tried quite a few things but nothing seems to work..
    <jsp:include page="Page2.jsp">
    Ive surrounded the code in the f:subview tags. still doesnt work.
    Ive tried using <jsp:useBean id="Page2" scope="page" class="visualwebapplication.Page2" > .. It does not give me an error, but does not embed the page as well. Do I need to some other code after this to use the above bean to display the page.
    Any help would be greatly appreciated.
    Regards
    Sparsh Agarwal

    Hi
    This is the error message that is generated in the tomcat log once i try to load the homePage.do
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationContext log
    SEVERE: Cannot forward after response has been committed
    java.lang.IllegalStateException: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
            at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
            at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
            at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
            at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.IllegalStateException: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
            at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
            at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
            at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
            at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:302)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
            at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jsp.view.main_005fright_jsp._jspService(main_005fright_jsp.java:54)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
            at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
            at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:609)
            at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
            at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
            at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: ServletException in '/view/main_right.jsp': Cannot forward after response has been committed
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:923)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Jul 31, 2008 2:27:47 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet action threw exception
    javax.servlet.jsp.JspException: ServletException in '/view/main_right.jsp': Cannot forward after response has been committed
            at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:923)
            at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspx_meth_tiles_005finsert_005f5(layoutBase_jsp.java:255)
            at org.apache.jsp.view.templates.layoutBase_jsp._jspService(layoutBase_jsp.java:120)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
            at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
            at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
            at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
            at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
            at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:572)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:221)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
            at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)

  • Embed a jsf page in a jsp page -

    Is there some way to included a jsf page inside a jsp page and code form action correctly ?
    In my JSP page I have the following:
    <jsp:include page="../user/unMapTrans.faces" />
    The page loads correctly, however, when I submit the form I get "Cannot find FacesContext"
    The way I'm coding form action in my JSP <form method="POST" action="../common/controller.jsp">
    The way JSF generates <form id="utform" method="post" action="/riskdb/user/unMapTrans.jsp" enctype="application/x-www-form-urlencoded">
    The JSP is another location than the JSF being called... http://localhost:7001/riskdb/common/controller.jsp
    My web.xml:
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <Oct 26, 2005 4:44:14 PM CDT> <Error> <HTTP> <BEA-101017> <[ServletContext(id=5261939,name=riskdb,context-path=/riskdb)] Root cause of ServletException.
    javax.servlet.jsp.JspException: Cannot find FacesContext
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
         at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
         at jsp_servlet._user.__unmaptrans._jspService(__unmaptrans.java:252)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bear.clearing.pace.webapp.servlet.PaceHttpFilter.doFilter(PaceHttpFilter.java:85)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

    included a jsf page inside a jsp pageAlternatives:
    (1)Rewrite your jsp to a new jsf and use <f:subview> for jsp:include action.
    (2)Rewrite your jsf action to produce a non-jsf response.

  • Save rendered JSF page into HTML

    Hi,
    We have a requirement wherein, a rendered JSF (i.e. JSP) page needs to be saved in HTML form on server side.
    One option is to write filter which will process the response and write to File. But in this case filter will intercept all request, while in my case, I want to generate HTML only when user click on particular button. For rest of the request it should bypass this filter.
    Apart from filter, can we have some API which will do this?
    Thanks
    Chintan

    Is the page contents idempotent or not? If it is, just use java.net.URLConnection to query the same page. If not, then you need to do more work. You need to clone the response stream before it is been sent to the client and store it somewhere. You can do it using a Filter which replaces the HttpServletResponse with your own HttpServletResponseWrapper implementation.

  • Want to integrate all jsf pages into one application like globle mene

    Hi,
    i have created lot of jsf pages, that all are in diffrenet-2- systems. Now i want to integrate all page in one system for one application. please tell me how i can integrate these in jdeveloper.
    Thanks in Advance.
    Sanjay

    Hi,
    if you want them all under one J2EE context root during runtime then you have to move the files to one project root, which is a manual configuration to do. For build requirements like this i think looking into Apache Maven could hep.
    Frank

  • How can I include a jsf page?

    I need to include a jsp page that contains jsf code, I try with:
    <c:import url="faces/include.jsp" var="prova" />
    but the server response:
    javax.servlet.ServletException: Cannot find FacesContext
    There something that is wrong?
    Thank's
    Teo

    I read the document but is not my case.
    My java server faces works well until I put the tag
    <c:import url="./include.jsp" var="jsf" />
    from tag library, ans I don't know why
    Thank's
    Matteo

  • jsp:include in JSF

    Hello all,
    I am having a problem including a jsp page into another jsp where both are using the JSF framework.
    If I used the <f:view> and bring up just that page by itself (not included in another page), it works fine. And if I include it in a page with no <f:view> tags, it works fine. But when I include it in a page with <f:view> tags and <f:subview> tags in the included page, it's like it pulls the JSF components out of the section of code it was in. I don't know if this is a bug or just something I'm doing incorrectly, but I don't understand why JSF needed to make page includes so difficult.
    My current setup is like this.
    A.jsp
    <taglibs>
    <html>
    <body>
    <table>
    <f:view>
    <h utputText />
    .........more code......
    </f:view>
    <jsp:include page="B.jsp" flush="false" />
    </table>
    </body>
    </html>
    B.jsp
    <taglibs>
    <% scriptlet %>
    <f:subview>
    <h:form>
    <table>
    ...Some table stuff...
    <tr>
    <td>
    <h:commandLink /> (this is what is not working)
    </td>
    </tr>
    </table>
    </h:form>
    </f:subview>
    Hopefully someone can look at this and give me some advice on how to structure the <jsp:include>, I've tried all sorts of things. I've tried subview in different ways to no avail. Thanks for the help.
    Patrick

    here is a sample JSP
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <f:verbatim>
    <html>
    <body>
    <table width="100%" cellspacing="0" cellpadding="0">
         <tbody>
         <tr>
              <td>
                   </f:verbatim>
                   <f:subview id="header">
                        <jsp:include page="<%=(String) request.getAttribute("header")%>"/>
                   </f:subview>
                   <f:verbatim>
              </td>
         </tr>
         </tbody>
    </table>
    </body>
    </html>
    </f:verbatim>
    </f:view>

  • Trying to dynamic include HTML into a JSP

    All,
    I am trying to include an HMTL file into a JSP file. I wish to do this dymanically. So, the following is not an option:
    <%@ include file="relativeURL" %>
    So, I am forced to resort to such measures as the following:
    <jsp:include page="<%=myPath%>"/>
    However, I get the following error:
    java.lang.IllegalStateException: Response has already been committed
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)....
    I tried it like this:
    <jsp:include page="<%=myPath%>" flush="true"/>
    I encoutered the same result. I have JSP 1.2 running Tomcat 3.1 with Apache 1.3.14, all on SunOS. Thanks in advance for any help.
    Nicholas

    One of the worst error messages you can get is the IllegalStateException. It simply means that an attempt has been made to forward or include but only a portion of the include was sent. In a situation like this the best way to handle the dynamic page content is to include it from a Servlet by sending the information you need through beans. Including the Servlet rather than the dynamic path would clear those errors right up. One thing to keep in consideration is that you can't just get the page and display it, you have to buffer it in so the state can be kept alive without timing out like it does with the dynamic include.
    Hope that helps. Been there, done that, I know how frustrating the error was.

  • Including jspx page into Panel Tabbed !!

    Hi all,
    Jdeveloper 11g is really powerful ..
    I want to create windows explorer interface which consists of two main areas:
    First one represented as a tree and the second to show the details of the selected item in the tree. I want the detail area to be as tabbed so that multiple tabs can be seen at a time, I developed most of this issue.
    Here is my question:
    How to include a jspx page into one of the tabs (showDetailItem) created in the panel tabbed, I've tried <jsp:include> but it didn't work
    Regards,
    Bassam

    not sure what you mean by Panel Tabbed, but you should be able to do something like the following so that when user clicks on a tab, the proper page will load:
    <af:showOneTab binding="#{backing_bean.showOneTab1}"
    id="showOneTab1" position="above">
    <af:showDetailItem text="Tab Text"
    binding="#{backing_bean.showDetailItem1}"
    id="id"
    disclosed="#{some evaluation}">
    <!-- include header jsp -->
    <f:subview id="positionHeader">
    <jsp:include page="/Header.jspx"/>
    </f:subview>
    </af:showDetailItem>
    </af:showOneTab>
    the included jsp will need to be stripped of at least the <f:view> tag since it's being included in another page that will already have the <f:view> tag. Can't remember if there are other tags <afh:html>, <afh:body> which might need to be removed from the included jsp.

  • How to include an ASP page from JSP?

    I had a working ASP page to be repeated on each page of the web site as an navigation bar updated from a single SiteMap.xml. Anyone knew how to include the ASP page from the JSP app?
    Thanks

    You might achieve your desired result by calling the ASP page from your JSP controller (server side) using the standard JAVA HTTP classes you could then process the resulting XML. I suggest you look at the JAVA API for more information in particular the JAVA.NET package and the HTTPUrlConnection class...
    http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html
    Hope this helps,
    BRgds,
    Simon

  • Include XSQL page into UIX page

    Hello,
    I am trying to build a page in UIX and then include an XSQL page into the <contents> region of the <pagelayout>.
    Does anyone know if this is possible? And if yes, if this should work agains OC4J and/or Apache/Jserv?
    I tried including the page using <uix:include node="pagename" /> but
    the uix engine assumes that the node has an .uix extension so this does not work (or even compile). Using the xsql namespace, I also tried <uix:include xsql:node"pagename" /> which does compile, but does not generate any output.
    Any ideas?
    Jeroen van Veldhuizen

    Hello,
    I am trying to build a page in UIX and then include an XSQL page into the <contents> region of the <pagelayout>.
    Does anyone know if this is possible? And if yes, if this should work agains OC4J and/or Apache/Jserv?
    I tried including the page using <uix:include node="pagename" /> but
    the uix engine assumes that the node has an .uix extension so this does not work (or even compile). Using the xsql namespace, I also tried <uix:include xsql:node"pagename" /> which does compile, but does not generate any output.
    Any ideas?
    Jeroen van Veldhuizen Hello Jeroen,
    First of all, why are you trying to do this? Is it for data binding with BC4J view objects? ?If so, then you might want to know that UIX already has native data binding support for BC4J.
    Having said that, I am not sure if you can combine XSQL and UIX tags. I shall verify this and let you know.
    Thanks
    -Kishore
    JDev Team

  • Passing jsf parameters to a jsp page

    how to access the parameters declared in jsf page from a jsp page.
    in the jsp page I need to access the paramaters something like request.getParameter("age");
    how to declare the same in the jsf page in h form.
    <h:form>
    <h:inputText value="" id = "age" />
    </h:form>
    and in the jsp page i should access this parameter like request.getParameter("age");
    how to accomplish this.
    Please help.

    Please don't doublepost. Continue here: http://forum.java.sun.com/thread.jspa?threadID=5252759

  • Newbie Alert: How can I include a JSF in a JSF

    Sorry for what must be a really stupidly easy question but I have tried every way I can think to get one JSF page to include another JSF page. For instance I want to include a standard site wide header. I am using jspx and have tried
    <f:subview id="header">
        <jsp:include page="header.jsf"/>
    </f:subview>and
    <f:subview id="header">
        <c:import url="header.jspx"/>
    </f:subview>and every variation you can imagine (both .jsf and .jspx extentions, with and without a rendered property on the subview, including everything in the included page in f:verbatim and a million other things). My header page is as simple as <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="2.0"
         xmlns:jsp="http://java.sun.com/JSP/Page"
         xmlns:c="http://java.sun.com/jsp/jstl/core"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html">
         <f:view>
              <f:verbatim>
    <p>this is a header</p>
              </f:verbatim>
         </f:view>
    </jsp:root>All the questions I have found seem to indicate that the above should work but I just get
    javax.faces.FacesException: Assertion Failed
         at com.sun.faces.util.Util.doAssert(Util.java:1302)
         at com.sun.faces.taglib.jsf_core.ViewTag.getComponentType(ViewTag.java:241)
         at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1013)
         at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1036)
         at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:749)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
         at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
         at org.apache.jsp.header_005f1_jspx._jspx_meth_f_view_0(header_005f1_jspx.java:77)
         at org.apache.jsp.header_005f1_jspx._jspService(header_005f1_jspx.java:55)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)and various other errors along the same lines.
    Can someone please give me some pointers. A working example would be nice :o)
    Many Thanks

    Many thanks. I still can't seem to get it to work though. I must be missing something really obvious. Could you have a quick look over these pages and tell me if anything is wrong.
    The including page (called page.jspx):
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="2.0"
         xmlns:jsp="http://java.sun.com/JSP/Page"
         xmlns:c="http://java.sun.com/jsp/jstl/core"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html">
         <jsp:directive.page contentType="text/html"/>
         <f:view>
              <f:loadBundle basename="localization.messages" var="text"/>
              <f:verbatim>
                   <![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
              </f:verbatim>
              <html xmlns="http://www.w3.org/1999/xhtml">
                   <head>
                        <title>Example</title>
                   </head>
                   <body>
                        <jsp:include page="simple_header.jsf"/>
                   </body>
              </html>
         </f:view>
    </jsp:root>the included page called simple_header.jspx
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="2.0"
         xmlns:jsp="http://java.sun.com/JSP/Page"
         xmlns:c="http://java.sun.com/jsp/jstl/core"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html">
         <f:subview id="header">
              <f:verbatim>
                   <p>Bar</p>
              </f:verbatim>
         </f:subview>
    </jsp:root>and finally the error message
    java.io.IOException: Stream closed
         org.apache.jasper.runtime.BodyContentImpl.ensureOpen(BodyContentImpl.java:576)
         org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java:140)
         org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java:157)
         org.apache.jsp.page_jspx._jspx_meth_f_view_0(page_jspx.java:102)
         org.apache.jsp.page_jspx._jspService(page_jspx.java:58)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    blah blah blah...

  • Actions/submitting non JSF forms to JSF pages

    Ok, I am new to JSF so bear with me,
    I am trying to execute some logic BEFORE displaying a JSP/JSF page - a simple example of this is checking if user is logged in, or getting data for the page based on parameters passed in from a non-JSF page (or on URL line), or deciding which page to display, etc. In other words similar to struts action.
    Seems basic but I cant figure out how to do it without placing logic into JSPs. All examples I see seem to require a submit from a JSF page to get to the controller logic. What am I missing?
    Thanks.

    I decide the struggling is a sheer waste of time and hurts future reusability and maintainability.
    Write a set of JSF embedded JSPs from scratch.
    Or give a try to: https://facelets.dev.java.net/

  • Reusing JSF Page Code

    I have 3 JSF pages which have the same block of Code.
    Is there a way I could use to make one JSF page say main.jsp with the main block of code and then use something like the include tag to just reuse and insert the main.jsp in my other 3 pages.
    The code is:
    <h:form id="frmRR">
        <f:loadBundle basename="com.eds.send.controller.Resource."
                      var="messages"/>
        <tr:panelHeader styleClass="titleText" text="RR"/>
        <tr:panelHorizontalLayout valign="top">
            <tr:panelHorizontalLayout valign="top">
                <tr:panelGroupLayout layout="vertical">
                    <tr:panelGroupLayout layout="horizontal">
                        <tr:panelGroupLayout styleClass="columnSpace boldAlignLeft"
                                             layout="vertical"
                                             inlineStyle="width:200px">
                            <tr:outputText value="To:"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="From:"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="Subject:"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="Business:"/>
                            <tr:outputText value="#{messages[\date\']}:"/>
                            <tr:outputText value="PN:"/>
                        </tr:panelGroupLayout>
                        <tr:panelGroupLayout styleClass="normalAlignLeft"
                                             layout="vertical"
                                             inlineStyle="width:350px">
                            <tr:outputText value="#{messages[\'hp.email\']} "/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="#{rR.userName}"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="R R"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="#{rR.subList.description}"/>
                            <tr:outputText value="#{rR.cyc}">
                             </tr:outputText>
                            <tr:outputText value="#{rR.pN}"/>
                        </tr:panelGroupLayout>
                    </tr:panelGroupLayout>
                    <tr:panelGroupLayout layout="vertical">
                        <f:facet name="separator">
                            <tr:spacer width="10" height="1"/>
                        </f:facet>
                        <tr:outputFormatted inlineStyle="font-weight:bold" styleClass=" columnSpace font_size"
                                            value="Email Message:"/>
                        <tr:inputText id="emailMessage"
                                      value="#{rR.emailMessage}"
                                      columns="50" rows="10" wrap="soft"/>
                    </tr:panelGroupLayout>
                    <tr:panelButtonBar>
                        <tr:commandButton text="Confirm"
                                          action="#{rRBean.createAction}"/>
                        <tr:commandButton text="Cancel" action="home"/>
                    </tr:panelButtonBar>
                </tr:panelGroupLayout>
            </tr:panelHorizontalLayout>
            <f:facet name="separator">
                <tr:spacer width="8"/>
            </f:facet>
            <tr:panelHorizontalLayout valign="top" halign="right">
                <tr:panelGroupLayout layout="vertical">
                    <tr:outputText inlineStyle="width:270px; font-size: 8pt; font-weight:bold; text-align: left"
                                   styleClass="subnav"
                                   value="#{messages[\'rReq.terms\']}"/>
                    <tr:outputText inlineStyle="width:270px; font-size: 8pt; font-weight:normal; text-align: left"
                                   styleClass="subnav"
                                   value="#{messages[\'rReq.body\']}"/>
                </tr:panelGroupLayout>
            </tr:panelHorizontalLayout>
        </tr:panelHorizontalLayout>
    </h:form>I want to be able to put this code in a Main jSP and then just include the tag in other JSPs where ever I want the above fields to be populated.
    How can this be achieved ?
    Thanks

    you already are blessed with the rare event of a Sun employee answering a question for you, now don't push it by demanding more. A simple google query can give you all the answers you need. For example this page can give you some hints:
    http://www.ibm.com/developerworks/java/library/j-facelets/
    The facelets website also has lots of documentation.
    https://facelets.dev.java.net/nonav/docs/dev/docbook.html

Maybe you are looking for

  • Safari won't connect to Linksys Range Expander

    Hope some one can end my sleepless nights... I have read the posts on this forum for this type of problem and have followed the advice given but still can't get my neighbours Mac laptop to connect to my wireless network I have a Desktop PC running wi

  • Balance  Amount

    hi,. i have three tables PARTY_DETAILS,BILL_DETAILS,PARTY_PAYMENT_DETAILS CREATE TABLE "PARTY_DETAILS" ( "S_NO" NUMBER, "PARTY_NAME" VARCHAR2(4000), "ADDRESS" VARCHAR2(4000), "MOB1_NO" VARCHAR2(30), CONSTRAINT "PARTY_DETAILS_CON" PRIMARY KEY ("S_NO")

  • PortalComponentException: Error in init method

    Anyone know why I am getting this error below? #1.5#00101810DF7F00570000057E000012A4000428586D6BCD3D#1170260164912#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#klm1#50377##lssvrep02_EP2_212781850#klm1#c18d3c00b14511dbc4e300101810df7f#SAPEn

  • Where do I find the "Sync Playlists" option for dual Nanos?

    In a recent answer to a post about more than one Ipod for one computer someone said use the Sync Playlists feature to seperate each persons music. Where is this? How do I do this exactly? I just put all the music from my library onto my wife's new Na

  • 5508 WLC in HA over a L2-VLAN

    Hi everbody, I am very interested in the new 7.3 feature HA. Also I can read that it is recommended to connect the two WLCs directly. Has anyone tried to use a L2-VLAN between them, in fact to bridge a distance between two data centres? Thank you for