Tiles + JSF error (Illegal to flush within a custom tag)

Hi,
When I try to use Tiles + JSF I have this error message :
javax.servlet.jsp.JspException: Illegal to flush within a custom tag
I am already using flush="false" on my tiles:insert tag.
This is my .jsp code :
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<tiles:insert beanName="cadastro_base" beanScope="request" flush="false">
<tiles:put name="form_body" type="string">
<f:view>
<h:form id="DisciplinaJsfBean" binding="#{DisciplinaJsfBean.form}" >
<h:inputText id="codigo" binding="#{DisciplinaJsfBean.itCodigo}"/>
</h:form>
</f:view>
</tiles:put>
</tiles:insert>
And this is the stack trace message :
exception
javax.servlet.ServletException: Illegal to flush within a custom tag
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
     org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspService(cadastrarDisciplinas_jsp.java:99)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     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:810)
     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)
root cause
javax.servlet.jsp.JspException: Illegal to flush within a custom tag
     com.sun.faces.taglib.jsf_core.ViewTag.doEndTag(ViewTag.java:223)
     org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspx_meth_f_view_0(cadastrarDisciplinas_jsp.java:205)
     org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspx_meth_tiles_put_0(cadastrarDisciplinas_jsp.java:157)
     org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspx_meth_tiles_insert_0(cadastrarDisciplinas_jsp.java:122)
     org.apache.jsp.security.disciplina.cadastrarDisciplinas_jsp._jspService(cadastrarDisciplinas_jsp.java:92)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     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:810)
     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)
Danilo.

What worked for me was to add a flush="false" to each of the <tiles:insert tags in my layout page.
I'm using this with JSF so it may be different for you:
... Layout stuff ...
   <tiles:insert attribute="body" flush="false" />
... More layout stuff, including more inserts with the flush="false" ....

Similar Messages

  • Javax.servlet.ServletException: Illegal to flush within a custom tag

    Hi ,
    I am developing a sample application for JSF , Tiles and Spring when i uses JSF with tiles i am getting the error
    javax.servlet.ServletException: Illegal to flush within a custom tag
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.pages.main_jsp._jspService(main_jsp.java:84)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
         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:810)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
         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)
    Here is the My master tiles layout file
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <HTML>
    <HEAD>
    <TITLE><tiles:getAsString name="title"/></TITLE>
    </HEAD>
    <BODY>
    <TABLE border="0" width="100%" cellspacing="5">
    <TR>
    <TD colspan="2"><tiles:insert attribute="header" flush="false" /></TD>
    </TR>
    <TR>
    <TD width="140" valign="top">
    <tiles:insert attribute='menu' flush="false"/>
    </TD>
    <TD valign="top" align="left">
    <tiles:insert attribute='body' flush="false"/>
    </TD>
    </TR>
    <TR>
    <TD colspan="2">
    <tiles:insert attribute="footer" flush="false"/>
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    and here is the main.jsf
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <tiles:insert page="/pages/template.jsp" flush="false" >
    <tiles:put name="title" value="Hello World" />
    <tiles:put name="header" value="/pages/header.jsp" />
    <tiles:put name="body" type="string">
    <f:view>
    <h:form id="catalogMenu">
    <table border="1" align ="center" >
    <tr>
    <td><a href="<img src="../images/image1.gif"><br>Struts in Action<br><a href="Add to Cart $39.00</td>
    <td><a href=" <img src="../images/image2.gif"><br>Juint in Action<br><a href="Add to Cart $35.00</td>
    </tr>
    <tr>
    <td><a href="<img src="../images/image3.gif"><br>Hibernate in Action<br><a href="Add to Cart $50.00</td>
    <td> <a href="<img src="../images/image4.gif"><br>Spring in Action<br><a href="Add to Cart $54.00</td>
    </tr>
    </table>
    </h:form>
    </f:view>
    </tiles:put>
    </tiles:insert>
    can any body please suggest why i this exception is coming

    What worked for me was to add a flush="false" to each of the <tiles:insert tags in my layout page.
    I'm using this with JSF so it may be different for you:
    ... Layout stuff ...
       <tiles:insert attribute="body" flush="false" />
    ... More layout stuff, including more inserts with the flush="false" ....

  • Tomcat4: Illegal to flush within a custom tag

    I tried to deploy to Tomcat4.1.18 a jsp-struts application developed with JDeveloper 9.0.3.1, simply obtained using the "Complete Struts-Based JSP Application" Wizard.
    When I access to a page containing the
    "jbo:DataRecord" tag or the "jbo:DataTable" I get this exception in the error log file (I do not know if other tags give this same error, but for example "jbo:DataScroller" does not):
    2003-04-15 09:28:35 ApplicationModule release mode is: Stateful
    2003-04-15 09:28:36 jsp: init
    2003-04-15 09:28:37 jsp: init
    2003-04-15 09:28:37 IO Error
    java.io.IOException: Illegal to flush within a custom tag
         at javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:115)
         at oracle.jbo.html.jsp.datatags.ComponentTag.doStartTag(ComponentTag.java:69)
         at org.apache.jsp.PazientiDateEventiViewLink1_0005fDateEventiEventiViewLink1$jsp._jspService(PazientiDateEventiViewLink1_0005fDateEventiEventiViewLink1$jsp.java:157)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
         at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1014)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:417)
         at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:390)
         at oracle.jbo.html.struts11.BC4JRequestProcessor.processActionForward(BC4JRequestProcessor.java:98)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:429)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495)
         at java.lang.Thread.run(Thread.java:484)
    2003-04-15 09:28:46 jsp: init
    2003-04-15 09:28:46 ApplicationModule release mode is: Stateful
    Deploying on a standalone OC4J everything works.
    Is there some configuration to add to the web.xml file or somewhere else? I tried also on Tomcat 4.0.3 with same results.
    I added this lines in web.xml to avoid the problems descripted in thread BC4J entity objects vs EJB2.0 entity beans
    <init-param>
    <param-name>enablePooling</param-name>
    <param-value>false</param-value>
    </init-param>
    Other non-struts-based webapps developed with JDev 9.0.2 and 9.0.3 were deployed correctly on Tomcat 4.1.18.
    Thanks,
    Marco.

    Hi Steve,
    I looked better at my page and it has been modified from that produced by the wizard. In fact, the problem arises substituting a DataTable tag with a RowsetIterate in which I put a DataRecord.
    Here there is a simple page which produces this error (I see the error only in the error log of Tomcat localhost_log.txt, not on the page):
    <%@ page language="java" import="oracle.jbo.*" errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <html>
    <head>
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <LINK REL=STYLESHEET TYPE="text/css" HREF="bc4j.css">
    <TITLE><bean:message key="browse.title"/></TITLE>
    </head>
    <body>
    <jbo:DataTransaction appid="Test3Module" />
    <h3><bean:message key="browse.header" arg0="CategoryView1"/></h3>
    <table border="0">
    <tr>
    <td ALIGN="right"><jbo:DataScroller datasource="Test3Module.CategoryView1"/></td>
    </tr>
    <tr>
    <%-- REPLACED DataTable WITH a RowsetIterate in which I put a DataRecord --%>
    <jbo:RowsetIterate datasource="Test3Module.CategoryView1" userange="true" >
    <td>
    <jbo:DataRecord datasource="Test3Module.CategoryView1" />
    </td>
    </jbo:RowsetIterate>
    <%--
    <td><jbo:DataTable datasource="Test3Module.CategoryView1" edittarget="/edit_CategoryView1.do"/></td>
    --%>
    </tr>
    </table>
    </body>
    </html>
    In this case, it is not so hard to avoid to put in the pages such a code.
    Thanks,
    Marco.

  • Getting Error : Illegal cross join within the same dimension

    Hi All,
    At database there are 4 tables - XLE_Entity_profiles (A) , XLE_ETB_profiles (B) ,XLE_Registration (C),XLE_Reg_Function(D) .
    Attribute info is as below -
    A.Le_name
    B.LRU_name
    C. Registraton name
    D. Function_code
    I have to model a single dimension which contains the attributes from these tables and dimension should also support queries which contains attributes from this dimension only without selecting any fact.
    For Exp - query is as below -
    Le_name,Le-Registraton name,Le_Function_code,LRU_name,LRU_Registraton name,LRU_Function_code
    To support such query , i created aliases of table XLE_Registration,XLE_Reg_Function.
    Aliases names are - XLE_Registration_LE (E),XLE_Registration_LRU (F),XLE_Reg_Function_LE (G).,XLE_Reg_Function_LRU (H)
    Attributes from aliases are as below -
    XLE_Registration_LE- Le-Registraton name
    XLE_Registration_LRU -LRU_Registraton name
    XLE_Reg_Function_LE - Le_Function_code
    XLE_Reg_Function_LRU - LRU_Function_code
    i have renamed the attributes For LE and LRU.
    The Physical layer diagram is as below
    A < B
    E F
    G H
    [A:B (1:M) , A:E(1:M), E:G(1:M),B:F(1:M),F:H(1:M)]
    At logical layer , i have created a dimension DIM-LE with below logical table sources -
    A ,B,E,F,G,H
    Using the properties of LTS B , i mapped B to A.
    Using the properties of LTS E , i mapped E to A.
    Using the properties of LTS F , i mapped F to B.
    Using the properties of LTS G , i mapped G to E.
    Using the properties of LTS H , i mapped H to F.
    Now when i run the query , i am getting the error -
    Query - Le_name,Le-Registraton name,Le_Function_code,LRU_name,LRU_Registraton name,LRU_Function_code
    +++Administrator:2a0000:2a0004:----2008/11/07 19:39:03
    Query Status: Query Failed: [nQSError: 14065|http://forums.oracle.com/forums/] Illegal cross join within the same dimension caused by incorrect subject area setup: [
    XLE_REGISTRATIONS T1218 On XLE_REGISTRATIONS_LRU.REGISTRATION_ID = XLE_REG_FUNCTIONS_LRU.REGISTRATION_ID,
    XLE_REG_FUNCTIONS T5737,
    XLE_ETB_PROFILES T900 On XLE_ETB_PROFILES.ESTABLISHMENT_ID = XLE_REGISTRATIONS_LRU.SOURCE_ID,
    XLE_ENTITY_PROFILES T836 On XLE_ENTITY_PROFILES.LEGAL_ENTITY_ID = XLE_ETB_PROFILES.LEGAL_ENTITY_ID] with [
    XLE_REGISTRATIONS T1155 On XLE_REGISTRATIONS_LE.REGISTRATION_ID = XLE_REG_FUNCTIONS_LE.REGISTRATION_ID,
    XLE_REG_FUNCTIONS T5703,
    XLE_ENTITY_PROFILES T836 On XLE_ENTITY_PROFILES.LEGAL_ENTITY_ID = XLE_REGISTRATIONS_LE.SOURCE_ID]
    But when i run below query,which resembles the BI Answer query, against the database ,
    select distinct A.NAME as c1,
    B.REGISTERED_NAME as c2,
    E.Function_code as c5,
    C.NAME as c3,
    D.REGISTERED_NAME as c4,
    F.Function_code as c6
    from
    XLE_ENTITY_PROFILES A,
    XLE_REGISTRATIONS B,
    XLE_REG_FUNCTIONS E,
    XLE_ETB_PROFILES C,
    XLE_REGISTRATIONS D,
    XLE_REG_FUNCTIONS F
    where (A.LEGAL_ENTITY_ID = C.LEGAL_ENTITY_ID and
    A.LEGAL_ENTITY_ID = B.SOURCE_ID and
    C.ESTABLISHMENT_ID = D.SOURCE_ID and
    B.SOURCE_TABLE = 'XLE_ENTITY_PROFILES' and
    D.SOURCE_TABLE = 'XLE_ETB_PROFILES' and
    E.Registration_id = B.Registration_id and
    F.Registration_id = D.Registration_id)
    order by c1, c2,c5, c3, c4,c6
    i don't get any error.
    Please let me know , why am i getting this error and how can i resolve this issue?

    Hi All,
    Is there any update on this ?
    Thanks,Ashish

  • WebLogic Server 7.0: Including another JSP from within a custom tag

    Hi all,
              has anyone made experience with including (ie. processing) a dynamic
              resource (JSP) from within a custom JSP tag?
              Using the following code inside doEndTag():
              pageContext.include("/templates/blub.jsp");
              throws a ServletException (Note: the JSP is a part of the web app
              which is deployed as war). Does it make a difference if the web
              application is warred up into and therefore include cannot resolve the
              specified relative URL?
              [Tomcat 4.1.10 doesn't have problems for that matter]
              The full stack trace is:
              javax.servlet.ServletException: java.lang.NullPointerException
              at com.foo.taglibs.template.InsertTag.doEndTag(InsertTag.java:55)
              at jsp_servlet._models.__index._jspService(__index.java:774)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:376)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5360)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2468)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
              TIA,
              niko.
              

    Try the same code from an exploded web app.
              Niko Schmuck wrote:
              > Hi all,
              >
              > has anyone made experience with including (ie. processing) a dynamic
              > resource (JSP) from within a custom JSP tag?
              >
              > Using the following code inside doEndTag():
              >
              > pageContext.include("/templates/blub.jsp");
              >
              > throws a ServletException (Note: the JSP is a part of the web app
              > which is deployed as war). Does it make a difference if the web
              > application is warred up into and therefore include cannot resolve the
              > specified relative URL?
              > [Tomcat 4.1.10 doesn't have problems for that matter]
              >
              > The full stack trace is:
              >
              > javax.servlet.ServletException: java.lang.NullPointerException
              > at com.foo.taglibs.template.InsertTag.doEndTag(InsertTag.java:55)
              > at jsp_servlet._models.__index._jspService(__index.java:774)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:945)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:332)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:376)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
              > at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5360)
              > at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:721)
              > at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3043)
              > at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2468)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
              >
              > TIA,
              > niko.
              Rajesh Mirchandani
              Developer Relations Engineer
              BEA Support
              

  • New to JSTL: jsp variable translated literally within the custom tag

    I have a basic custom tag that simply processes greeting. Neither of the below scenarios works and I am trying to understand why
    <%
    String name = (String)request.getParameter( "name" )
    %>
    <custom:greeting name="<%= name %>"/>
    <%
    pageContext.setAttribute( "name", name );
    %>
    <custom:greeting name="${name}"/>
    If you have any suggestions, I look forward to hearing from you.

    When i ran the code I get my "Hello <%= name %> "or "Hello ${name} "
    My source
    public class HelloTag extends TagSupport{
    public String name = "World";
    public void setName( String value )
    name = value;
    public int doEndTag()
    try{
    pageContext.getOut().println( "Hello " + name );
    }catch( IOException e){}
    public HelloTag()
    super();
    What do you mean by jsp level. It resides in my Root directory under Tomcat

  • Illegal cross join within the same dimension caused by incorrect

    Hi,
    I created a logical table from 2 different Physical tables. Then I created a Dimension out of this logical table.
    At the BI Answer, while I tried drilling on the dimension, I get the following error:
    “Illegal cross join within the same dimension caused by incorrect subject area setup “
    Please let me know if there is any work around this issue.
    Thanks,

    I think that OBIEE try to do a cross join but don't allow it
    http://gerardnico.com/wiki/dw/join/cross_join
    It generate surely a join with two tables where you don't have any condition or relation in the physical layer.
    When you check the column from the subject area are you sure that you have a condition in the physical layer for the two tables ?
    When you say "I tried drilling on the dimension", does it means that you have a report and when you click on link which come from a dimension level, it doesn't work ?
    Regards
    Nico

  • Custom Tag Error with Weblogic SP9

              Hi
              I seem to be having a problem with a custom tag that I wrote. When I run the JSP
              on WLS (without a service pack), the generated java code uses the weblogic.utils.StringUtils
              class to interprete jsp expressions that are passed into the custom tag's attribute
              (on the JSP). The method called on this StringUtils class is valueOf(). This method
              in essence makes sure that the result of the expression is not null and then subsequently
              calls a toString() on the value. Note that if the value is null it simply returns
              an empty string.
              The problem is that when we go to service pack 9, this method is not called (StringUtils.valueOf()).
              Now the problem arises if first of all the result of the expression statement
              in the custom tag definintion (on the JSP) is null. Secondly, it will also error
              out when the setter method is called within the custom tag, if the object returned
              from the expression does not match the one that is expected by the tag... in our
              case a String.
              Here's a sample usage of the tag:
              <wescombop:selectTag
              selectName="buildingNumber"
              selectedItem="<%= buildingJB.getBuildingNumber()%>"
              trimSelectedItem="true"
              selectTagDataName="buildingNumberDataAttribute" />
              Note: buildingJB.getBuildingNumber() returns BigDecimal
              Here's a snipett of the line generated java:
              * Without the service pack
              comwestfieldgrp_wescom_bop_view_tag_SelectTag_1.setSelectedItem(weblogic.utils.StringUtils.valueOf(buildingJB.getBuildingNumber()));
              *With Service Pack 9
              comwestfieldgrp_wescom_bop_view_tag_SelectTag_1.setSelectedItem(buildingJB.getBuildingNumber());
              Note: The setSelectedItem() method expects a String object as a parameter, so
              the code with service pack 9 will result in a compilation error, since buildingJB.getBuildingNumber()
              returns a BigDecimal.
              Let me know if you need more explanation.
              Has anyone experience this problem before... Any help would be deeply appreciated.
              Thanks all.
              Niran
              

              Modify the <cewolf:param> tag.
              <cewolf:chart id="confchart" title="Reports" type="bar3d" yaxislabel="Time"> <cewolf:data>
              <cewolf:producer id="report"> <cewolf:param name="type" value="all" > </cewolf:param>
              </cewolf:producer> </cewolf:data> </cewolf:chart>
              "Balakrishnan" <[email protected]> wrote:
              >
              >We are using cewolf charting library in weblogic 7.0. The charting library
              >is implemented
              >as custom jsp tag library module.
              >
              >However, when the use the tag for displaying the chart, weblogic is producing
              >this compiler error.
              >
              >/reports/reportsView.jsp(108): no corresponding open tag for tag extension
              >close:
              >//[ null; Line: 108]
              >
              >Here's the corresponding source of the jsp file:
              >
              > <cewolf:chart id="confchart" title="Reports" type="bar3d" yaxislabel="Time">
              > <cewolf:data>
              > <cewolf:producer id="report">
              > <cewolf:param name="type" value="all" /> (<-- Error occurs
              >here.
              >Line no: 108)
              > </cewolf:producer>
              > </cewolf:data>
              > </cewolf:chart>
              >
              >I've also checked the corresponding tld file and it is in place.
              >
              >The same code without any modifications is working fine in tomcat. Can
              >you please
              >let me know what needs to be corrected to make this work?
              

  • JSF 1.2 style facelets custom tags in JSF 2.0

    Ahoy.
    Using facelets with JSF 1.2, one could create a custom tag in an xhtml file along the lines of:
    labelledInput.xhtml:
    <ui:component>
        <h:outputLabel value="#{label}: ">
            <h:inputText value="#{value}"/>
        </h:outputLabel>
    </ui:component>
    ...You could register it in faces-config.xml or somewhere and then use it with <custom:labeledInput label="Type Something: " value="#{bean.value}"/>.
    Alternatively, one could use <ui:composition> instead of <ui:component> in which case the tag wouldn't be considered as a component.
    I think it could possibly be done with composite components, but they're not quite the same, and their documentation is pretty limited (at least until some of the books come out this year).
    I want to use these more as shortcuts to reduce code duplication rather than adding functionality and they seemed to work well in the past for this.
    If they can't be used, is there a way of creating a composite component that doesn't act as a component?
    In particular, I want to make a tag that contains two components:
    - a label
    - a panel group containing an input and a message for that input
    Then I can add a bunch of these to a 2-column panel grid for a nicely formatted form. Doing it with composite components forces each tag to be a single component, which I don't want. Old-facelets <ui:composition> based tags would let me do this (I think.)

    Hello,
    You posted in the wrong forum. This one is dedicated to the Oracle Forms product.
    Francois

  • How to create a new custom tag in JSF 1.2

    Hi there,
    In JSF 1.2, all the classes (CommandButtonTag, CommandLinkTag, DataTableTag,...) in package com.sun.faces.taglib.html_basic are defined as final class. In JSF 1.1, we can create a custom tag that extends the tag in JSF taglib; it save us lots of time.
    Could anybody know how to create a new custom tag in JSF 1.2?
    Many thanks,
    Emily

    If I recall, it was done because how tags were to be handled in 1.2 was very different from 1.1 and it was felt that developers shouldn't rely on implementation specific classes (unless they were SPI) for several other reasons (application portability being the big one here).
    If it's felt that this was the wrong decision, please feel free to log an issue [1] against the RI (to date, no one has).
    As to the 'borked' dependency URLs, please log an issue [1] if you find these. We have nightly builds going that work from a clean workspace and checking today's result, it seems ok.
    [1] https://javaserverfaces.dev.java.net/issues

  • Illegal cross join within the same dimension caused by incorrect subject ar

    hi!
    Imagine the following BMM:
    There is one Logical Dimension Table "Service Account" with the following LTS:
    - LTS "D_SERVICE"
    - LTS "D_SERVICE_CLASS"
    - LTS "D_SERVICE_STATUS"
    This Logical Tabe "Service Account" joins (One-to-many) with several Fact Tables (other Logical Tables).
    In the Physical Layer the joins for the "Service Account" LTS are:
    - One-to-many between D_SERVICE_CLASS and D_SERVICE
    - One-to-many between D_SERVICE_STATUS and D_SERVICE
    The problem is that when I build a report in Answers using only the following columns of the Logical Table "Service Account":
    - Service Class Desc (which exists in the Logical Table "Service Account" and in the Physical Table D_SERVICE_CLASS)
    - Service Status Desc (which exists in the Logical Table "Service Account" and in the Physical Tabl D_SERVICE_STATUS)
    - MSISDN (which existis in the Logical Table "Service Account" and in the Phsyical Table D_SERVICE)
    the following error appears:
    Estado: HY000. Código: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14065] Illegal cross join within the same dimension caused by incorrect subject area setup: [ (select * from prd.D_SERVICE where SOURCE_SYS in ('ARBOR','PPB') and DW_SERV_ST_ID in (100000003,100000009)) as T1836, D_SERVICE_CLASS T1916] with [ D_SERVICE_STATUS T1948] (HY000)
    SQL emitido: SELECT "SERVICE ACCOUNT"."TLC MSISDN9" saw_0, "SERVICE ACCOUNT"."IWS Service Class Desc" saw_1, "SERVICE ACCOUNT"."TLC Service Status Desc" saw_2 FROM "VFPT - Upgrade Siebel" WHERE "SERVICE ACCOUNT"."TLC MSISDN9" = '917330340' ORDER BY saw_0, saw_1, saw_2
    Help, please!
    Thanks.

    Physically, only D_SERVICE is joined to the facts. Then D_SERVICE_CLASS is joined to D_SERVICE (one-to-many) and D_SERVICE_STATUS is joined also to D_SERVICE (one-to-many).
    In the BMM, there is only one Logical Dimension Table for those 3 physical tables. This Logical Dimension Table is called "Service Account" and has 3 LTS: D_SERVICE, D_SERVICE_CLASS, D_SERVICE_STATUS. The Logical Dimension Table has several logical columns that are associated to those 3 LTS: SERVICE_KEY, SERVICE_CLASS_KEY, SERVICE_STATUS_KEY, SERVICE_MSISDN, SERVICE_CLASS_DESC, SERVICE_STATUS_DESC.
    The Logical Dimension Table "Service Account" is then joined to a fact table (one-to-many).
    I didn't understand the suggestion about the 3 LTS... Aren't we doing that already? Can you explain it better, please?
    thanks.

  • [nQSError: 14065] Illegal cross join within the same dimension

    Hey guys,
    I'm stumped. I have two dimension tables that are joined 1:N (there is NOT an M:N relationship between them) and I have them joined in the Physical Layer and the Business Model and Mapping Layer. The two tables are F4101 (the "1") and F4102 (the "N") in the 1:N relationship. F4102 then joins to a fact table, and F4101 joins to NOTHING else. So I don't believe I have a circular condition or a need for a bridge table. Both tables are published to the Presentation Layer for reporting.
    The error occurs in Answers when I want to do something as trivial as display the three primary key columns together from F4101: F4101.col1, F4101.col2, F4101.col3 (all three make up the PK). When I do that, the following error occurs:
    "nQSError: 14065] Illegal cross join within the same dimension caused by incorrect subject area setup: [ F4101 T28761] with [ F4102 T1805] "
    What I can't figure out is WHY the F4102 table is listed in this error. I didn't try to report on it at all. See the logical SQL below from my query:
    "SQL Issued: SELECT "Item Master (F4101)".IMITM saw_0, "Item Master (F4101)".IMLITM saw_1, "Item Master (F4101)".IMAITM saw_2 FROM "Sales Analysis" ORDER BY saw_0, saw_1, saw_2"
    As soon as I take out one of the three PK columns and add in another non-PK column from F4101, it works just fine. And reporting on each of the three PK columns individually works as well in Answers.
    Any ideas? I would greatly appreciate it.
    Thanks.

    Try this;
    1. In the logical layer, create one folder called F4101_F4102.
    2. Map both F4101 and F4102 as logical table sources in that folder.
    3. Join from the folder F4101_F4102 to the fact using a Logical (new complex join) join.
    Chris.

  • Illegal cross join within the same dimension caused by incorrect subject.

    Hello Gurus,
    I am getting this error for one calculated column in OBIEE 11G
    Illegal cross join within the same dimension caused by incorrect subject area setup. *[ WC_PC_POSITION_D AS Dim_WC_PC_POSITION_D] with [ W_GL_ACCOUNT_D AS Dim_W_GL_ACCOUNT_D On Dim_W_GL_ACCOUNT_D.ROW_WID = Fact_WC_PC_BUDGET_DTLS_F.GL_ACCOUNT_WID, WC_PC_BUDGET_DTLS_F AS Fact_WC_PC_BUDGET_DTLS_F] (HY000)*
    the same column is calculated in OBIEE 10G and it's giving fine result.
    the way it's calculated in BMM is we are using 2 different logical table's column for deriving new column.
    is anyone having any idea?
    Thanking You..

    More Specially,
    Physical Layer:
    Dim:View1,View2,View3,View4
    Fact:View5
    all Views are PK joined in Phsical layer.
    So I need all columns in 3 Views and few column in View4.
    In BMM :
    Dim:View1,View2,View3
    Fact:View 5
    are joined and created LTS in View3 for LTS View4 and dropped few coulmns and mapped the columns.
    In reports,
    If I pull the columns from View3 which is came from view4 then getting the error.
    I hope does it make sense.
    Please help on this.

  • Illegal cross join within the same dimension

    Hi,
    When certain fields are selected within the presentation table an "illegal cross join" error is returned by the BI Server. However if a FACT is added from one of the other presentation tables the "illegal cross join" error goes away. we need to query without fact column.
    We are getting following error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14065] Illegal cross join within the same dimension caused by incorrect subject area setup: [ CALL_CENTER.COUNSELOR_MANAGER T782130] with [ CALL_CENTER.COUNSELOR_HR T781594 On CALL_CENTER.COUNSELOR_HR.MASTER_STAFF_COUNSELOR_ID = CALL_CENTER.MASTER_STAFF_COUNSELOR.MASTER_STAFF_COUNSELOR_ID, CALL_CENTER.MASTER_STAFF_COUNSELOR T781739] (HY000)
    Can anybody help me solving this issue.
    Thanks,
    KS.

    Please give us an example of what you need.
    OBIEE perform a query in the dimension or through the fact table.
    You can't join two dimensions in the repository without going through a fact table.
    If you need to query without fact column, it's because you have design two dimensions where
    normally you can do one.
    You have then two solutions :
    * change the design of your logical model to make only one dimension.
    * use the OBIEE logical SQL in answer.
    http://gerardnico.com/wiki/dat/obiee/bi_server/design/obiee_logical_sql
    Success
    Nico

  • Tomcat 6.0.9 and jsf 1.2 and jstl 1.2 using *.tag file error

    I using :tomcat 6.0.9 and jsf 1.2 and jstl 1.2
    My web.xml is at version 2.5 and I am using a custom tag (with the .tag extension). I am trying to use the http://java.sun.com/jsf/html library and values from my attribute. I'm new to this so I figure I must just me missing something.
    I am run http://192.168.1.1/test.jsf laster,view:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:212)
         org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:576)
         org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:50)
         org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:627)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:631)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:645)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:190)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:414)
         com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:455)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:139)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.9 logs.
    if go to /WEB-INF/tags/test.tag ,delete line: <h:outputText id="test" value="hello!" />
    run http://192.168.1.1/test.jsf is OK!(no error),So I guess error for "<h:outputText id="test" value="hello!" />" line ,why in test.tag file do can't use the "http://java.sun.com/jsf/html " library,please help me.......
    Here is file WEB-INF/web.xml content:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements. See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License. You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    -->
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
    version="2.5">
    <display-name>Welcome to Tomcat</display-name>
    <description>
    Welcome to Tomcat
    </description>
    <!-- Faces Servlet -->
    <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup> 1 </load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    </web-app>
    Here is file /test.jsp code:
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <f:view>
    <html>
    <head>
    <title>test</title>
    </head>
    <body>
    <!-- body start -->
    <h:outputText id="myinfo" value="test success" />
    <tags:test/>
    <!-- body end -->
    </body>
    </html>
    </f:view>
    Here is file /WEB-INF/tags/test.tag code:
    <%@tag pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <h:outputText id="test" value="hello!" />
    Thanks for any help.

    Don't know if it's important, but there is no schema avaiable at: http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd
    I found the right one at: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
    /perty
    Message was edited by:
    perajonsson

Maybe you are looking for

  • How do I skip footer records in Data file through control file of sql*loade

    hi, I am using sql*loader to load data from data file and i have written control file for it. How do i skip last '5' records of data file or the footer records to be skiped to read. For first '5' records to be skiped we can use "skip" to achieve it b

  • Error - No authorization for object while viewing transformations in BI 7.0

    Folks, In BI 7.0, In the Data flow diagram, when I had tried to click on the transformation sybmol, system is throwing an error message No authorization for object   (authorization object ) Message no. RS_EXCEPTION250 Do I need to request for authori

  • How to set up logical components for ChaRM?

    Hi, we do have the following system landscape. One DEV and two separate QA and PROD systems. DEV-> >QA1  -> PROD1 >QA2  -> PROD2 For these we want to transport parallel from DEV to QA1/QA2 and then parallel to PROD1/PROD2 via ChaRM. My questions are:

  • Trouble with 2 OS CDs

    I am having trouble with my mac. I am currently running OS 9.2.2 (Updated from 9.2.1) which was made possible by my Mac OS 9.1 CD that i got a few weeks ago. I also have an Ubuntu "Edgy Eft" CD and a Mac OS X 10.4.1 DVD. Mac OS 10.4.1 however does no

  • Error Send Invoice to ECC 6.0

    Hi masters.  when I creates an Invoice in SRM the Idoc is send to ECC but return a message error Error in process. into backend in transaction WE02 found the red light with the next message. EDI: Partner profile inbound not available   what can I do