A peculiar problem using jsp:include conditionally

Hi,
This is regarding usage of jsp:include in Myfaces 1.1.4.
lets say the page containing the jsp:include statements as PARENT PAGE
I have a requirement to display some components in the PARENT PAGE which are continued from the same form using different JSPs since the components are different based on a condition.
I used the following code:
<h:panelGrid id="CandidateRequestorView" rendered="#{RgsViewRequirementBB.displayCandidateView}" columns="1">
     <jsp:include page="/RGSPages/requestorViewReq.jsp"/>
</h:panelGrid>
<h:panelGrid id="CandidateMatcView" rendered="#{!RgsViewRequirementBB.displayCandidateView}" columns="1">
     <jsp:include page="/RGSPages/matcViewReq.jsp"/>
</h:panelGrid>Now if I use only 1 panel grid (any one out of the above 2) it works. I didnt even use <f:subview> any where( neither in the PARENT PAGE nor in the included jsps), but it works.... Also for your knowledge these jsps contain only JSF elements( no plain HTML code is used)
But if I am using the above displayed code to have both the jsps (actually only one will be displayed bcoz the same condition is used)
then its not displaying all the contents of included jsp. (YES I AM ABLE TO GET TO THE JSP...THERE IS NO ERROR) There is a datatable inside this jsp which is not rendered......
I have used <f:subview> when i faced this problem.......
I have tried every combination....writing <f:subview> in the PARENT PAGE ....writing in included jsps and removed it from PARENT PAGE.....also some of the articles in the forum mentioned that <f:subview> element should not be used inside <h:panelgrid> .....i even tried that....but final result is same as I was getting the first time...
I am able to reach the jsp page (with or without <f:subview>) but i am not able to display all the contents....but if i use only one of the included jsps(by removing any one of the panel grids) I am able to view them. Since I am able to view all the contents when i view these pages inside the PARENT PAGE one at a time, that indicates there is no problem in datatable contained in these pages.....
( Also I have not used <f:view> inside my included jsps.)
Please help to solve this problem...
Thanks
Avner

Hi BalusC,
The RgsViewRequirementBB is already in the session scope.
Also I am using the setDisplayCandidateView(true) or setDisplayCandidateView(false ) explicitly as depicted below. The page is still under construction thats why the rendered attribute is explicitly set.
public RgsViewRequirementBackingBean() {
super();
// TODO Auto-generated constructor stub
try{
            setDisplayCandidateView(true);
             // some more code goes in here
     catch(Exception){
           ResourceBundle bundle = null;
           bundle = ResourceBundle.getBundle("resources.ErrorMessages", FacesContext.getCurrentInstance().getViewRoot().getLocale());
             //some more code goes in here
}

Similar Messages

  • Problem using jsp:include from inside a custom tag

    Hi, All !
              I have a problem using <jsp:include> from inside a custom tag. Exception is:
              "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              could not do this. Is it a bug, since in the 1.1 spec is said: "The
              BodyContent is a subclass of JspWriter that can be used to process body
              evaluations so they can retrieved later on."
              My code is:
              <wfmklist:items>
              <jsp:include page="item.jsp" flush="true"/>
              </wfmklist:items>
              

    This is an area of contention with WL. It is not so tolerant with regards to
              the spec. I spent several days recently trying to convince it to accept the
              specification in regards to bodies and includes and it appears to have
              successfully rebuffed my efforts.
              Frankly, this is very disappointing. It appears that some shortcuts were
              taken on the way to JSP 1.1 support, and the result is a very hard-coded,
              inflexible implementation. As I have not seen the implementation myself, I
              hate to assume this, however one could posit that the term "interface" was a
              foreign concept during the implementation, other than as some annoying
              intermediary reference requiring an immediate cast to a specific Weblogic
              class, which in turn is apparently required to be final or have many final
              methods, as if being optimized for a JDK 1.02 JIT.
              I am sorry that I don't have any positive suggestions other than to use a
              URL object to come back in an execute the necessary "include" directly. You
              lose all context (other than session) and that can cause its own problems.
              However, you can generally get the URL approach to work, and you will
              hopefully avoid further frustration.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              Tangosol: How Weblogic applications are customized
              "Denis" <[email protected]> wrote in message
              news:[email protected]...
              > Hi, All !
              > I have a problem using <jsp:include> from inside a custom tag. Exception
              is:
              > "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              >
              > Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              > could not do this. Is it a bug, since in the 1.1 spec is said: "The
              > BodyContent is a subclass of JspWriter that can be used to process body
              > evaluations so they can retrieved later on."
              >
              > My code is:
              > ...
              > <wfmklist:items>
              > <jsp:include page="item.jsp" flush="true"/>
              > </wfmklist:items>
              > ...
              

  • Using jsp:include in iPlanet6SP2

    I'm trying to include a common jsp file, say [proj_common]/common.jsp, from
    another jsp file, say [proj_parent]/parent.jsp, using <jsp:include>. After
    deployment both files sit under their respective folders (for example in
    c:\iplanet\ias6\ias\APPS\modules) as [proj_common]/common.jsp and
    [proj_parent]/parent.jsp. I've included a relative path from [proj_parent]
    to [proj_common], and here's the code I've added in
    [proj_parent]/parent.jsp:
    <jsp:include page="../[proj_common]/common.jsp">
    <jsp:param name="p1" value="v1"/>
    </jsp:include>
    I'm using only static HTML in common.jsp as a test. The following error then
    occured when I view [proj_parent]/parent.jsp :
    500 SC_INTERNAL_SERVER_ERROR
    Error: 500 SC_INTERNAL_SERVER_ERROR
    javac error:
    c:\iplanet\ias6\ias\APPS\modules\[proj_parent]\WEB-INF\compiled_jsp\jsp\APPS
    \[proj_parent]\..\[proj_common]\common.java:1: Identifier expected.
    package jsp.APPS.[proj_parent]....[proj_common];
    ^ (pointing under 2nd dot of ....)
    c:\iplanet\ias6\ias\APPS\modules\[proj_parent]\WEB-INF\compiled_jsp\jsp\APPS
    \[proj_parent]\..\[proj_common]\common.java:11: Superclass HttpServlet of
    class common not found.
    public class common extends HttpServlet {
    ^ (pointing under HttpServlet)
    2 errors
    I believe this is not a path error (since that error explicitly tells me the
    included file cannot be found). I have read other previous messages and
    learn that there is a problem with <jsp:include> and relative paths... Also
    a test when both files are in the same directory shows no problem at all. Is
    there a solution to this problem of parsing relative paths in SP2?
    Thanks and regards,
    Anthony Yuen

    Another strange thing happened:
    We have been including html and jsp files. From a certain point the system was
    not able to include html files. When we renamed html includes to jsp, it was
    working again.
    Has anyone experienced the same thing?
    Does anyone know the resolution?
    Regards,
    Gyorgy
    Anthony Yuen wrote:
    I'm trying to include a common jsp file, say [proj_common]/common.jsp, from
    another jsp file, say [proj_parent]/parent.jsp, using <jsp:include>. After
    deployment both files sit under their respective folders (for example in
    c:\iplanet\ias6\ias\APPS\modules) as [proj_common]/common.jsp and
    [proj_parent]/parent.jsp. I've included a relative path from [proj_parent]
    to [proj_common], and here's the code I've added in
    [proj_parent]/parent.jsp:
    <jsp:include page="../[proj_common]/common.jsp">
    <jsp:param name="p1" value="v1"/>
    </jsp:include>
    I'm using only static HTML in common.jsp as a test. The following error then
    occured when I view [proj_parent]/parent.jsp :
    500 SC_INTERNAL_SERVER_ERROR
    Error: 500 SC_INTERNAL_SERVER_ERROR
    javac error:
    c:\iplanet\ias6\ias\APPS\modules\[proj_parent]\WEB-INF\compiled_jsp\jsp\APPS
    \[proj_parent]\..\[proj_common]\common.java:1: Identifier expected.
    package jsp.APPS.[proj_parent]....[proj_common];
    ^ (pointing under 2nd dot of ....)
    c:\iplanet\ias6\ias\APPS\modules\[proj_parent]\WEB-INF\compiled_jsp\jsp\APPS
    \[proj_parent]\..\[proj_common]\common.java:11: Superclass HttpServlet of
    class common not found.
    public class common extends HttpServlet {
    ^ (pointing under HttpServlet)
    2 errors
    I believe this is not a path error (since that error explicitly tells me the
    included file cannot be found). I have read other previous messages and
    learn that there is a problem with <jsp:include> and relative paths... Also
    a test when both files are in the same directory shows no problem at all. Is
    there a solution to this problem of parsing relative paths in SP2?
    Thanks and regards,
    Anthony Yuen

  • Using jsp:include in showOneTab - main form not loaded on submit

    I have a JSP page with JSF and ADF components. It is a large JSP containing some main details and then an af:showOneTab component to create a set of tabs. It works fine with JDK 1.5 and Tomcat 5.0 but when changed to Oracle Application Server 9.0.4 and JDK 1.3 We get the following error:
    JspCompileException:.... code too large for try statement catch( Throwable e}....
    Finding this to be caused by large size of JSP, we divided the page as follows - a main jsp containing the main form details and 1 jsp for each tab. Whenever one of the tabs is clicked the corresponding JSP is dynamically loaded using jsp:include tag as follows:
    <af:showDetailItem text="Tab1" id="tab1" styleClass="menu">
              <f:subview id="viewTab1">
                   <jsp:include page="Tab1.jsp" />
              </f:subview>
    </af:showDetailItem>
    There is a Submit button in the main jsp, when this is clicked the main jsp is reloaded.
    But when the user navigates to any of the tabs and then clicks the Submit button in the main form, the main form is not reloaded - only the jsp for the currently selected tab is loaded.
    (I am using f:view and h:form in the main form, and no form tag in the included jsps)
    How to solve this problem?

    The af:selectOneChoice components are in the test.jsp page included in main.jsp with jsp:include tag.
    The code look like this:
                   <af:selectOneChoice label="#{msg.team}"
    id="soc1"
    value="#{myBean.selectedTeamID}"
    autoSubmit="true">
    <f:selectItems id="si1" value="#{myBean.teamList}"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="#{msg.subteam}"
    id="soc2"
    value="#{myBean.selectedSubteamID}"
    partialTriggers="soc1"
    rendered="#{myBean.selectedTeamID!=null}"
    autoSubmit="true">
    <f:selectItems id="si2" value="#{myBean.subteamList}"/>
    </af:selectOneChoice>
    the code works fine in the seperate page, but when I include the page the second selectOneChoice component doesnt get rendered.
    Edited by: Migan on 2010-jul-13 08:36

  • Using JSP include function

    Using JSP include function + collapse/expand table
    (1) I've got a page A (A.jsp) and a page B (B.jsp) which includes 3 files : the header (head.html) and the side panel of icons (icons.jsp) are the same files for both A.jsp and B.jsp
    but the 3rd file containing the contents, are different for A and B
    (2) icons.jsp
    This is what the side panel of icons is suppose to do. E.g. click on icon1, its submenu will appear and the 3rd file is suppose to link to e.g. A.jsp
    When click on icon2, icon1's submenu will collapse and icon2's submenu will expand and the 3rd file is suppose to link to B.jsp
    The expand/collapse function is written in javascript
    (3) Problem : e.g. when i click on icon1, its submenu wont remain expanded, when it changes to another page, icon1's submenu will collapse back, even though the other page includes the icons.jsp too.
    Hence, i've decided to pass a parameter using JSP to achieve the desired effect. as a result, i include the icons file like this
    <%@ include file="icons.jsp?item=icon1" %>, but the icons.jsp file isnt included into the page at all.
    Is the above include file method possible? And is it possible to use JSP to achieve the effect i've stated?
    Thanx

    sounds more like a html problem.
    Do you have a target with the <a href> of your icons? Sounds like the icon page is being refreshed as well.
    <html>
    <frameset .....>
    <frame src=header.jsp name=head>
    <frameset name=bottom>
    <frame src=icons.jsp name=navigate>
    <frame src=dummy.jsp name=content>
    </frameset>
    </frameset>
    try <img src=niceIcon1.gif>

  • Problem with jsp:include of 2 or more pages in a jsp in OC4J 10.1.3

    My application has ben developed in spring framework and it is running successfully in jdeveloper,
    but when I deployed my application in OC4J 10.1.3,
    I am getting strange results, one of the jsp includes 2 and more jsps using <jsp:include> tag, but I could see only first of them in my jsp is included and the
    remaining display area for remaining included jsps are filled with the first included jsp only, The application is running successfully in Jdeveloper 10.1.3
    I have been trying to solve this problem for the last 3 weeks,
    please help me in this regard.
    Thanks

    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[35]);
    String __url=OracleJspRuntime.toStr("/wo.create.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[36]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[37]);
    __jsp_tag_ctru8.setPageContext(pageContext);
    __jsp_tag_ctru8.setParent(__jsp_tag_ctru7);
    __jsp_tag_ctru8.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'woUpdate'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru8.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[38]);
    String __url=OracleJspRuntime.toStr("/wo.update.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[39]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[40]);
    __jsp_tag_ctru8.setPageContext(pageContext);
    __jsp_tag_ctru8.setParent(__jsp_tag_ctru7);
    __jsp_tag_ctru8.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'woCharge'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru8.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[41]);
    String __url=OracleJspRuntime.toStr("/wo.charge.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[42]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[43]);
    __jsp_tag_ctru8.setPageContext(pageContext);
    __jsp_tag_ctru8.setParent(__jsp_tag_ctru7);
    __jsp_tag_ctru8.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'woSearchAdvanced'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru8.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[44]);
    String __url=OracleJspRuntime.toStr("/wo.search.advanced.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[45]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[46]);
    __jsp_tag_ctru8.setPageContext(pageContext);
    __jsp_tag_ctru8.setParent(__jsp_tag_ctru7);
    __jsp_tag_ctru8.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'woViewDetail'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru8.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[47]);
    String __url=OracleJspRuntime.toStr("/wo.view.detail.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[48]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[49]);
    __jsp_tag_ctru8.setPageContext(pageContext);
    __jsp_tag_ctru8.setParent(__jsp_tag_ctru7);
    __jsp_tag_ctru8.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'woAttach'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru8.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[50]);
    String __url=OracleJspRuntime.toStr("/wo.attach.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[51]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[52]);
    __jsp_tag_ctru8.setPageContext(pageContext);
    __jsp_tag_ctru8.setParent(__jsp_tag_ctru7);
    __jsp_tag_ctru8.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'contactUs'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru8.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[53]);
    String __url=OracleJspRuntime.toStr("/contact.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[54]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[55]);
    __jsp_tag_ctru8.setPageContext(pageContext);
    __jsp_tag_ctru8.setParent(__jsp_tag_ctru7);
    __jsp_tag_ctru8.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'help'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru8.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[56]);
    String __url=OracleJspRuntime.toStr("/help.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[57]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[58]);
    __jsp_tag_ctru8.setPageContext(pageContext);
    __jsp_tag_ctru8.setParent(__jsp_tag_ctru7);
    __jsp_tag_ctru8.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'error'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru8.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[59]);
    String __url=OracleJspRuntime.toStr("/error.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[60]);
    } while (__jsp_tag_ctru8.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[61]);
    __jsp_tag_ctru9.setPageContext(pageContext);
    __jsp_tag_ctru9.setParent(__jsp_tag_ctru7);
    __jsp_tag_starteval=__jsp_tag_ctru9.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[62]);
    String __url=OracleJspRuntime.toStr("/wo.view.html"); // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[63]);
    } while (__jsp_tag_ctru9.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru9.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[64]);
    } while (__jsp_tag_ctru7.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru7.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[65]);
    __jsp_tag_ctru6.setPageContext(pageContext);
    __jsp_tag_ctru6.setParent(null);
    __jsp_tag_ctru6.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${fn:startsWith(module.centerModule,'wo')}",java.lang.Boolean.class, __ojsp_varRes, __ojsp_fnmappers[0])));
    __jsp_tag_starteval=__jsp_tag_ctru6.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[66]);
    __ojsp_s_out.write(__oracle_jsp_text[67]);
    String base_url = request.getContextPath();
    base_url+="/statistics.html";
    __ojsp_s_out.write(__oracle_jsp_text[68]);
    out.print( base_url);
    __ojsp_s_out.write(__oracle_jsp_text[69]);
    __jsp_tag_ctru10.setPageContext(pageContext);
    __jsp_tag_ctru10.setParent(__jsp_tag_ctru6);
    __jsp_tag_ctru10.setTest(OracleJspRuntime.toBoolean( (java.lang.Boolean)oracle.jsp.runtime.OracleJspRuntime.evaluate("${module.centerModule == 'woCreate' || module.centerModule == 'woCharge' || module.centerModule == 'woUpdate'}",java.lang.Boolean.class, __ojsp_varRes,null)));
    __jsp_tag_starteval=__jsp_tag_ctru10.doStartTag();
    if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))
    do {
    __ojsp_s_out.write(__oracle_jsp_text[70]);
    String __url=OracleJspRuntime.toStr("/history.equip.html");
    // Include
    pageContext.include( __url,false);
    if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) return;
    __ojsp_s_out.write(__oracle_jsp_text[71]);
    } while (__jsp_tag_ctru10.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru10.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    __ojsp_s_out.write(__oracle_jsp_text[72]);
    } while (__jsp_tag_ctru6.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
    if (__jsp_tag_ctru6.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
    return;
    The lines in bold are inside a switch case , the problem is generating when I am including two pages
    "/wo.charge.html" and
    "/history.equip.html"
    the output of "/wo.charge.html" is duplicating
    in place of "/history.equip.html"
    Somewhere I have read that there is a size limit for jsp service method of upto 64KB,
    the above code is in a jsp "/main.html" of size when compiled (.java) 42KB
    "/wo.charge.html" is of size 40KB
    Could this be leading to probem?
    Please clarify the above things
    Thanks
    Message was edited by:
    user471571

  • ADF FACES EA16 Why survey demo don't use jsp:include for common part

    Is it a reason why the surveyPage1, surveyPage2 and others don't use jsp:include to load dynamically the actions, menuglobal and location facet ?
    These facet's contains the same adf components with same properties !
    Why not use a subview containing these flow management component and include this subview in the panelpage with the jsp:include ?
    I'm testing this approach but i'm not able to render these components ... may be i'm completely wrong ? I didn't find any example in the demo that demonstrate how to include subview in an adf document or panelpage.
    Help will be appreciate a lot !!!

    so what exactly is the problem here?
    what is not working?

  • A problem about jsp:include

    When I use
    <jsp:include page="list.jsp" >
    <jsp:param name="year" value="2002" />
    </jsp:include>
    how can I get the value of the param year in the jsp list.jsp?

    yes, but from JSTL.
    but to use it, you have to
    in your jsp
    <%@ taglib uri="jstl-core" prefix="c"%>
    in your web.xml
    <taglib>
    <taglib-uri>jstl-core</taglib-uri>
    <taglib-location>/WEB-INF/c.tld</taglib-location>
    </taglib>
    in your /WEB-INF folder put c.tld (and the other JSTL tld files if you want)
    and jstl.jar in your /WEB-INF/lib folder.
    The JSTL tag lib provide a lot of possibility ...
    Regards.

  • Problem when using jsp:include.. / in JSP when run on OC4J903

    I have a very unusual JSP question when run in OC4J903(EM or standalone) version (previous OC4J version was ok). Here is the description
    1. run P1.jsp and a parameter(text1) will pass to P2.jsp
    2. In P2.jsp, include "includePage.jsp" before show the parameter.
    question:
    1. The P1.jsp parameter will be null if using "POST" method, but "GET" is work.
    anyone have a indea ? or is that a bug in OC4J903 version
    P1.jsp
    <html>
    <head>
    <title>Test</title>
    </head>
    <body>
    <form method=POST action='P2.jsp'>
    <input type=text name='text1' size=30>
    <input type=submit value='OK'>
    </form>
    </body>
    </html>
    P2.jsp
    <html>
    <head>
    <title>Test</title>
    </head>
    <jsp:include page="includePage.jsp" flush="true">
    <jsp:param name="importParam" value="P2 Export" />
    </jsp:include>
    <body>
    <%
    out.print("Here shows the param from P1: " + request.getParameter("text1")+"<br>");     
    %>
    </body>
    </html>
    includePage.jsp
    <%@ page import="java.io.*"%>
    <%
    out.print("Here runs the include page. The param from P2 is: " + request.getParameter("importParam")+"<br>");
    %>

    I have a very unusual JSP question when run in OC4J903(EM or standalone) version (previous OC4J version was ok). Here is the description
    1. run P1.jsp and a parameter(text1) will pass to P2.jsp
    2. In P2.jsp, include "includePage.jsp" before show the parameter.
    question:
    1. The P1.jsp parameter will be null if using "POST" method, but "GET" is work.
    anyone have a indea ? or is that a bug in OC4J903 version
    P1.jsp
    <html>
    <head>
    <title>Test</title>
    </head>
    <body>
    <form method=POST action='P2.jsp'>
    <input type=text name='text1' size=30>
    <input type=submit value='OK'>
    </form>
    </body>
    </html>
    P2.jsp
    <html>
    <head>
    <title>Test</title>
    </head>
    <jsp:include page="includePage.jsp" flush="true">
    <jsp:param name="importParam" value="P2 Export" />
    </jsp:include>
    <body>
    <%
    out.print("Here shows the param from P1: " + request.getParameter("text1")+"<br>");     
    %>
    </body>
    </html>
    includePage.jsp
    <%@ page import="java.io.*"%>
    <%
    out.print("Here runs the include page. The param from P2 is: " + request.getParameter("importParam")+"<br>");
    %>

  • Relatiive Path problem when using JSP:include in web portlet

    Hi
    I am using Oracle Portal 9.0.2, and thus OC4J as the J2EE platform.
    I have created a JSP web portlet that is supposed to inlude a specific static html file, which name is passed to it using a portlet parameter. It works, but I had to create a symbolic link from the applicable J2EE applications's htdocs directory in order to access the content:
    /j2ee/OC4J_Portal/applications/<application>/htdocs/<portlet>/content/
    where /content/ is a symbolic link to another directory altogether.
    I can then access the content from within the portlet with a JSP include tag that looks like :
    docPath = "/htdocs/<portlet>/html/"+doc_path;
    %>
    <br>Include:
    <jsp:include page="<%=docPath%>" flush="true"/>
    I would like to access the content using the JSP include without having to use the symbolic link. Is there a way to do this. I tried using an Apache alias, but that did not work.
    Regards
    Harry

    Hi
    Thanx
    In the end we build up a static URL to the document to be included using:
    String contentLocation="content/";
    docPath = contentLocation+getAdditionalDocPath();;
    out.println("docPath="+docPath);
    String docPathAndName = portletRequest.getParameter("doc_path");
    %>
    <!--
    This java script function calls the display content page with the
    page parameter doc_path (which is in return passes it to the display
    content portlet) in order to retrieve and display specific document
    with a JSP:include tag
    -->
    <script language="JavaScript">
    function generateSectionPath(docName) {
    this.location="http://<%=portletRequest.getServerName()%>:<%=portletRequest.getServerPort()%>/pls/portal/url/page/<%=getPageGroup()%>/content?doc_path="+"<%=docPath%>"+docName;
    <script language="JavaScript">
    function generateRelativePath(docName) {
    this.location="http://<%=portletRequest.getServerName()%>:<%=portletRequest.getServerPort()%>/pls/portal/url/page/<%=getPageGroup()%>/content?doc_path="+docName;
    </script>
    <br>Include:
    <%
    if (portletRequest.getParameter("doc_path") == null) {
    out.println("Error - no doc path specified");
    } else { 
    try { %>
    <jsp:include page="<%=docPathAndName%>" flush="true"/>
    <% } catch (Exception e) {
    out.println("Error retrieving document:"+e.toString());
    } // end if
    %>
    Each link from one included HTML file to another becomes a JS function that points the browser to the portal page that includes the portlet that includes thwe JSP that has the include tag to include the html document that is to be displayed.
    The current relative path the the html document (from a predefined root in the file system that is symbolically linked to the same directory as where the including JSP lives) is stored in a session variable, and appended to the document name that is passed to the page.
    If a full document path, as opposed to just the name, is stored, that no appending is done. However, the path is stripped out and stored in a session variable.
    Ths thing is, sometimes a document name, and sometimes a path is passed to the page. Therefore the requirement to know the path when it is not available. A name only will always be passed subsequent to a request for a document with the full path specified, therefore the session variable mechanism works.
    Thanx for the input
    Harry

  • Using jsp:include in jsf

    I want to include a jsp page in another jsp page. My code is as follows:
    1)
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jstl/core"
    version="2.0">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Page Title</title>
    </head>
    <body>
    <f:subview id="sub">
    <jsp:include page="/demo.jsp"/>
    </f:subview>
    </body>
    </html>
    </jsp:root>
    2) demo.jsp is given below
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jstl/core"
    version="2.0">
    <ui:composition>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Page Title</title>
    </head>
    <body>
    <h:outputText value="Hello"/>
    </body>
    </html>
    </ui:composition>
    </jsp:root>
    but when i run this application i get error as follows:
    javax.servlet.ServletException: @15,48 <jsp:include> Tag Library supports namespace: http://java.sun.com/JSP/Page, but no tag was defined for name: include
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
         org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
         org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
         org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
         org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)

    You're mixing two view technologies with each other: JSP and Facelets. You cannot do that. Use the one or the other. In Facelets you can just use <ui:include>. Leave all of those legacy <jsp> tags out when using Facelets.
    By the way, although the <f:subview> is superfluous in Facelets and only used in JSP, I wanted to tell you, this tag is better to be placed in the include file, not in the parent file. Otherwise you may risk "duplicate component ID" problems.

  • Unable to run jsp as include using jsp:include tag

    I am trying to run the basic jsp:include sample provided by Oracle in OC4J 10g. When I run the code, It seems like include file is treated as text/html and not run at all. Can somebody help me in figuring out what I am missing here..
    Here is the code for main.jsp
    <jsp:include page="content.jsp">
    <jsp:param name="a" value="1"/>
    <jsp:param name="b" value="2"/>
    <jsp:param name="c" value="3"/>
    </jsp:include>
    Here is the code for content.jsp
    <p> Included Content </p>
    <p> Parameters - ${param.a}, ${param.b}, ${param.c} </p>
    When I run this code in JDeveloper10g using the embedded OC4J as well as Application Server 10g, I get the following output.
    Included Content
    Parameters - ${param.a}, ${param.b}, ${param.c}
    Note that the parameter values are not substituted properly.
    Thanks in advance
    Niraj

    javax.servlet.ServletException: com/sun/tools/javac/Main (Unsupported major.minor version 49.0)
    This is your problem either your tomcat or eclipse is pointing to a wrong jre
    here the problem is you are trying to run a code that was compiled using j2sdk1.5 in j2sdk1.4

  • Problem using jsp:forward in java script

    hi,
    when I use jsp forward tag inside java script i'm getting a problem that
    when the jsp is invoked it is getting forwarded to the page specified in the forward tag, without checking the if conditions. Following code may give you a better idea.
    <html>
    <script>
    function test()
    if(document.f.htemp.value=="true")
    alert("jus");
    else
    var s=document.f.htemp.value;
    alert(s);
    <jsp:forward page="success.jsp" />
    </script>
    <body>
    <form name="f" method=post>
    <input type=text name=htemp value="true">
    <input type=button onclick="test()">
    </form>
    </body>
    </html>
    please help me,thanks inadvance
    regards
    chandu

    What pgeuens means is that you can't mix javascript and jsp/java code in this way.
    ALL of the jsp/java code gets executed at the server end.
    This produces an HTML page (with embedded javascript) which gets sent to the client.
    The client then runs javascript code in response to events (onLoad, onClick, onChange etc etc)
    So in this case, the jsp:forward will always be executed, because as far as the server is concerned, the javascript is just template text.
    If you WANT to do a conditional forwarding on the server side you do it in java ie (horribly using scriptlet)
    <%
    if (testCondition){
    %>
      <jsp:forward>
    %<
    %>Or if you want to test what the client has entered client side, all you can do is submit the form, or navigate to a URL
    <script>
    function test()
    if(document.f.htemp.value=="true")
    alert("jus");
    else
    var s=document.f.htemp.value;
    alert(s);
    document.f1.action="success.jsp";
    document.f.submit();
    </script>You cannot run JSP code based on your javascript code.
    Java. Javascript. Not the same thing.
    Hope this helps,
    evnafets

  • Writing JSP dynamically & using  JSP includes

    Need help with this one --
    I am pulling data from various fields of the DB and then placing the data into session vars so that based on what a user selects, the right information is displayed.
    My problem is this - I want to be able to display a jsp include file based on what the user selects. So the flow would go something like this
    EXAMPLE
    // USER selects a fruit (from a drop-down form) --> apple
    "apple" is stored in session var named fruit.
    // USER SUBMITS and expects to see a page based on his <%=fruit %> selection.
    //show_page.jsp
    I want to use the include tag that will call the right page based on the user selection -- like this:
    <%@ include file="<%= fruit%>.jsp" %>
    And in my thinking this would return - <%@ include file="apple.jsp" %> and thus include the right file for the user.
    Anyone know if embeding JSP to include a session var is possible?
    Thanks for any help
    Mark
    I know my synax is wrong. It's like I'm trying to embed a JSP tag inside inside a JSP include tag.
    Is there any way to do this

    learn the syntax...you won't get so many errors.
    "Professional JSP", WROX Press is great.
    scriplets ("<%....%>") can't have action tags in them.
    example:
    <%
    String include = "some_page.jsp"
    %>
    <jsp:include page="<%=include%>" />
    good luck.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Syntax error when using jsp:include...

    @ all
    I get a syntax error at the jsp:include line, character "";
    Can anybody help me with that issue?
    Jürgen

    select coalesce(col1,col2) joined_col, col3, sum(col4), col5 from data group by joined_col,col5You cannot use a column alias like this directly inside the group-by clause. You will have to rewrite this to:
    select coalesce(col1,col2) joined_col, col3, sum(col4), col5 from data group by coalesce(col1,col2),col5Furthermore I assume that the 'col5' in the group by should be 'col3', not?
    Or vice-verse the 'col3' inside the select-list should be 'col5'...

Maybe you are looking for

  • Function module-open_job

    Hi ,     i am using function module open_close ,close_job to run the program in the background in user-exit, when i execute the transaction everthing goes fine, but when i debug it it give me a dump , stating invalid startdate. Thanks & Regards

  • Printing problems with hp laserjet 1018

    - printing problem with my hp laserjet 1018 (no *.pdf files!), all other documents were printed - hp photosmart premium c309 works with all file types Windows 7 64 bit Adobe Acrobat Pro 10.1.7 Acrobat Reader 11.0.3

  • Photoshop CS4 Extended    Vista

    Customer Notes: Photoshop CS4 on 64 bit will only print a thumbnail,but on 32 bit it works fine.  Reinstalled drivers, no change.  print drivers are running from \windows\system32\spool\drivers\x64\.  All other programs 32/64 bit print without issue.

  • Follow instructions at N1 Releases Notes doesn't work for V240

    I followed exactly what's written here: Solaris based Sun Fire X4100 or X4200 management server: 1. Stop the server and agent. # su - n1gsps -c "/opt/SUNWn1sps/N1_Service_Provisioning_System_5.1/server/bin/cr_server stop" # su - n1gsps -c "/opt/SUNWn

  • Permissions work locally but not remotely

    I've a server that if I log in locally I can change/manage file/folder permission with no issues....but if I remote in via Remote Desktop Connections (I've tried from several workstation sub-nets) I can log on, navigate to the folders, but I can't ch