JSF and JSTL integration

Can anyone tell me how to access JSF objects from JSTL tags?
I want to set a requestScope flag in my changeListener
... context.getExternalContext().getRequestMap().put("xxx","ok"); ... and render output depending on existance of this flag:
...<c:if test="${requestScope.xxx!=null}" > .... .
This examplecode doesn't work, JSTL tags cannot access this var! How can I do that?
What I realy want is to reload another frame when user changed a specific input field.
Above code should add a JavaScript to reload the frame if this is true .
I can't do this on submit because the other framepage uses the stored/modified data.
Maybe there's a better approach for this anyway?
Thanks for your help!

Thanks for your help - I found it was my own mistake why it didn't work. Now it does, as you said.
But in the meentime I ran into another Problem mixing JSTL und JSF:
I want to build a SelectOneMenu and populate it with data from a database, but with selectItemValue
other than selectItemLabel (value should be numeric DB-ID, label a readable name).
Since "selectItems" allows only one dimensional Arrays (?) as parameter, I must use "selectItem" for
each row. So I wrote following code:
<h:selectOneMenu id="m1" value="#{worktime.employee}">
   <sql:query var="employees" dataSource="jdbc/WebOfficeDB">
       select oid,displayname from employees order by displayname asc
    </sql:query>
    <c:forEach var="row" items="${employees.rows}" >
       <f:selectItem itemValue="#{row.oid}" itemLabel="#{row.displayname}" />
    </c:forEach>
</h:selectOneMenu>This doesn't work, I get NullPointer Exceptions from selectItem.setValue().
I think because JSF "#" references another context than JSTL "$" - is this correct?
So I tried to set a JSTL variable inside the forEach loop to access the datarow
<c:set var="data" value="${row}" scope="request"/>
<f:selectItem itemValue="#{requestScope.data.oid}" itemLabel="#{requestScope.data.displayname}" />
...The effect is that all lines of the selectOneMenu have the same content (from the last datarecord)!?
Since this is my first project in JSTL and JSF and should stay a small one I don't want to go into building
CustomComponents and so on for such a simple Task.
I would be very very happy for some tips and hints, since I think this mixing of JSTL and JSF Context
will be a very common problem within my project.
Thanks

Similar Messages

  • JSF And Struts Integration

    Can any body give some info on integration of JSF to existing struts application

    I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
    http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
    Hope that helps.

  • JSF and JSTL 1.2...please help, i`m going nuts

    Hey guys,
    This is driving me up the wall. I`m running glassfish v2 b19 (i havent upgraded, because this one works for me).
    But i have a problem using jstl in my jsf app. i`m trying to do the following :
                                                    <c:choose>
                                                        <c:when test="#{currentRow.value['dboSTANDBY_LOG.STANDBY_LOG_TYPE'] eq 'server'}">
                                                            <webuijsf:tableColumn binding="#{standby$Standby_Log.tableColumn19}" headerText="NAME"
                                                                id="tableColumn19" sort="dboSTANDBY_LOG.SBYN_HOST_NAME" width="40">
                                                                <webuijsf:staticText binding="#{standby$Standby_Log.staticText20}" id="staticText20" text="#{currentRow.value['dboSTANDBY_LOG.SBYN_HOST_NAME']}"/>
                                                            </webuijsf:tableColumn>
                                                        </c:when>
                                                        <c:otherwise>
                                                            <webuijsf:tableColumn binding="#{standby$Standby_Log.tableColumn17}" headerText="NAME"
                                                                id="tableColumn17" sort="dboSTANDBY_LOG.APPL_SYSTEMS_PROP_INNUMBER" width="40">
                                                                <webuijsf:staticText binding="#{standby$Standby_Log.staticText18}" id="staticText18" text="#{currentRow.value['dboSTANDBY_LOG.APPL_SYSTEMS_PROP_INNUMBER']}"/>
                                                            </webuijsf:tableColumn>
                                                        </c:otherwise>
                                                    </c:choose>
    but the app server fails on building the page saying :
    According to the TLD, the attribute test is not a deferred-value or deferred-method, but the specified value contains a #-expression
    Now as far as i now, JSTL 1.2 should be included in J5EE, which is in glassfish already, correct?
    and JSTL 1.2 supports using deferred expressions, correct?
    So why for the love of my sanity is this not working?
    aaaaaa.
    Thanks
    D

    I haven't actually used/tried this myself, and I am not a JSF expert, this error looks similar to the error message attribute xxx does not support runtime expressions.
    I think you are reading the error message wrong.
    You have supplied a deferred expression. No question of that.
    I think the error is saying that the 'test' attribute of the <c:when> tag does not support deferred evaluation. - ie you cant use #{expr} with the <c:when> tag.
    According to the JSTL1.2 spec, it seems that "deferred expressions" are only supported by the looping tags (<c:forEach> and <c:forTokens>) and the <c:set> tag.
    I think the JSF equivalent would be the rendered attribute. Can you use the rendered attribute with the webuijsf:tablecolumn tag? Or another JSF container type tag?

  • JSF and JSTL.  :'(

    I'm trying to include a "jspx" component if the user has a role, but "c:if" seems not to work.
        <f:view>
        ${submenu}
        ${not empty submenu}
        <c:if test="#{not empty submenu}"><jsp:include page="${submenu}" /></c:if>
       </f:view>The first 2 lines print
    mysubmenufile.jspx
    true
    ... other code, not my included file! :'(
    Why it doesn't work. I'm using .tag files, and it works fine, but i've to use scriptlet code, like
    <% if (cond) { %>lot of unpretty JSF tags<% } %>
    Can somebody help me to fix it?

    JSTL and JSF don't really play together that well.
    I don't know if JSTL tags can understand the #{expr} expr.
    Mostly I find it easier to just use JSF.
    Any time you include a page, I believe you need to use <f:subview> tags
    Why not use that and the rendered attribute to accomplish the same thing:
    <f:subview id="submenuView" rendered="#{not empty submenu}">
      <jsp:include page="${submenu}" />
    </f:subview>Does that work?

  • Mixing JSF and JSTL

    Hi group,
    I need some help with the following. I'd want to make use of a JSF managed bean (request scope) within a JSTL tag. This is not possible unless the JSF managed bean was accessed before within a JSF tag. That time the bean will be initialized.
    How can I make sure the JSF managed bean is properly initialized so I can use it within my JSTL tags?
    Thanks!

    I'm using IBM Websphere portal (V6). Right now I have no access to the code and cannot provide you with a sample. However, I'm sure the code is fine as when I move the JSTL code to after the JSF code (so that the managed bean gets initialized by the JSF tag) it all works without problems...
    Regards,

  • JSF and JSTL fmt:message

    I have the following JSP:
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
    <html>
    Language: <fmt:message key="test.language"/>
    </html>When I run this without faces (http://localhost:8080/myapp/test.jsp), it works fine, the language for the message is choosen by the browsers language setting. If I run this thru faces servlet (http://localhost:8080/myapp/faces/test.jsp) the message is english always and the browser setting is ignored (english is the default language of the VM running tomcat).
    It may be a problem in JSTL because request.getLocale() returns the correct locale in both cases.
    Any ideas?
    I tried JSTL 1.0.5, Tomat 4.1.30 and 5.0.19
    Thanks a lot
    Andreas

    JSF sets the locale for the view to the locale specified by the Accept-Language request header (i.e., the user's browser language setting) that is the best match for the locales defined as the default or supported locales in faces-config.xml, or to the JVM default locale if none of them matches. The selected locale is made available for JSTL i18n actions (when you use JSP for the view), so as long as you define all locales you support in faces-config.xml, your page shouldwork fine.

  • 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

  • JSF and Struts - differences and integration goal.

    I am a newbie J2EE developer and I am not clear about main differences between JSF and Struts also I saw couple of articles describing integration between JSF and Struts. Could someone give me an explanation, what the main conceptual differences between those technologies and what's the goal of integration both of them?

    I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
    http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
    Hope that helps.

  • JSF 1.2 and JSTL 1.2

    Now that JSF 1.2 and JSTL 1.2 both use the new unified EL is it possible to use them together? I know they could be used together before but it was discouraged. I'm mostly interested in the functions and the loops (although Trinidad seems to be working pretty well).

    Thanks... I have switched over to facelets but I am getting the same problem:
    <ui:composition template="./../WEB-INF/layout.xhtml">
       <ui:define name="menu">
               <ui:include src="./flightMenu.xhtml" />
       </ui:define>
       <ui:define name="content">
         <h:panelGrid border="0" columns="1" style="width:100%">
            <h:form>
              <rich:tabPanel switchType="ajax" 
                  valueChangeListener="#{flightBean.flightTabPanel.valueChanged}"
                  binding="#{flightBean.flightTabPanel.tabPanel}" id="tab_panel">
                  <f:valueChangeListener type="org.richfaces.TabChangeListener" />
                  <rich:tab name="test" label="test">
                          <h:outputText value="bla bla" />
                  </rich:tab>
                  <ui:repeat var="tabb" value="#{flightBean.flightTabs}">
                          <rich:tab name="#{tabb.fltNum}" >
                                  <h:outputText value="bla bla" />
                          </rich:tab>
                  </ui:repeat>
              </rich:tabPanel>
            </h:form>
         </h:panelGrid>
       </ui:define>
    </ui:composition>The probem is that the tabb.fltNum method is not being invoked... If anyone has been able to build dynamic tabs using RichFaces using a similar approach I will like to see how you did it...
    BRgds, Paul

  • Where do I put the Jakarta files standard.jar and jstl.jar when developing with JSF 2.0 in OEPE using web logic server

    hi everybody, I am wondering what should i do with the standard.jar and jstl.jar files when using we logic. I tried putting both files into
    the directory c:\oracle\middleware\oracle_home\user_projects\domains\base_domain\bin.  I don't know if this is correct.  Thanks in
    in advance for the help.

    Anyways I found this link on www.oracle.com website by the same author of the book I am reading Deepak Vohra - Templating with JSF 2.0 Facelets.
    although here he is using Weblogic 11g although I don't think it makes a difference.  have a look at the Setting up the Environment section
    where he says to download the jstl.jar and standard.jar files.
    http://www.oracle.com/technetwork/articles/java/facelets-454361.html

  • Relevent specifications for JSF 2.0 and JSTL 1.2 specification evaluation.

    Hi,
    I am studying final draft version of JSF 2.0.
    What all other specifications required for JSF 2.0 and JSTL 1.2 specification evaluation with respect to glass fish 3.0.
    Please let me know what all other JSRs required to go through.
    Thanks,
    Ravi

    You will want a solid understanding of Servlets.
    You may want to use EJBs and EARs; then again, you may not.

  • Jsf and tiles via myfaces

    Greetings:
    Please either confirm and/or correct following proposed solution for Myfaces tiles.
    Issue: isert a tile definition and attribute in a pure jsf page.
    First passed solution: A hybrid of Jsp programming and Jsf. I was able to create a tile page layout in pure jsf except in the portal columns i used old fashion jsp programming to insert a list of portletDefinitions which is extracted from jsf ValueBinding of its managed beans.
    The problem with the above approach is that it works well only with html portlet fragments. When a portlet fragment has some jsf elements, the page rendering has conflict of simultaneous rendering between jsf and jsp. The portlet fragments are rendered in a woring place.
    Proposed solution: use <h:dataTable ...> to render the portletList and extract the item portletDefinition as following:
    <h:dataTable var="portlet"
    value="#{portalTabbedBean.selectedPane.serviceListL}" >
    <f:verbatim>
    <h:outputText
    value="<tiles:insert name=#{portlet.portletDefinition} flush='false' /> " />
    </f:verbatim>
    </h:dataTable>
    Note on the name of tiles:insert element, which i just extracted the definition as a jsp variable to make it work in the first hybrid solution:
    <tiles:insert name="<%=portletDefinition%>" flush="false" />
    Thanks
    BaTien
    DBGROUPS

    I reply this myself. Jsf and Jsp programming either via Jstl or while loop do not go together under current version.
    I solve the problem by using Jsp programming and insert the portlet tile fragment directly rather than though a portlet template with different tile content attribute. The portlet tile is created as <h:panelGrid ...> and observe the set rules to make Jsf and jsp working together. Hopefully Jsf and Jsp will be able to work together nicely in their next specifications.

  • What is JSF and where use it

    hi!
    i dont know what is jsf and where use it
    what different from JSTL
    thanks...

    At this level a visit to JSF-Tutorials (http://www.jsftutorials.net/) might the best thing to do. Or dig into a book.
    Basically it has a different scope than JSTL.
    JSF is a presentation layer framework. Other names in that area are:
    Struts, Spring MVC, Tapestry, and many more
    JSTL is a collection of JSP-tags and therefor covers only a VERY small part of the presentation layer. And it is very far away from a framework
    hth
    Alexander

  • JSF/Tiles/Spring Integration Problem

    Hi,
    I have a JSF based web application, which uses Struts Tiles framework through the view-handler "org.apache.myfaces.tomahawk.application.jsp.JspTi lesViewHandlerImpl". Now I am trying to integrate this with the Spring framework by making use of the variable-resolver "org.springframework.web.jsf.DelegatingVariableRes olver". With this, when I try to access a page, (whose backing bean gets injected with Spring beans) I get the following exception:
    javax.faces.el.EvaluationException: Expression Error: Named Object: 'userSession' not found.
    at com.sun.faces.config.ManagedBeanFactory.getScopeFo rSingleExpression(ManagedBeanFactory.java:998)
    at com.sun.faces.config.ManagedBeanFactory.hasValidLi fespan(ManagedBeanFactory.java:931)
    at com.sun.faces.config.ManagedBeanFactory.evaluateVa lueBindingGet(ManagedBeanFactory.java:892)
    at com.sun.faces.config.ManagedBeanFactory.setPropert iesIntoBean(ManagedBeanFactory.java:553)
    at com.sun.faces.config.ManagedBeanFactory.newInstanc e(ManagedBeanFactory.java:234)
    at com.sun.faces.application.ApplicationAssociate.cre ateAndMaybeStoreManagedBeans(ApplicationAssociate. java:253)
    at com.sun.faces.el.VariableResolverImpl.resolveVaria ble(VariableResolverImpl.java:79)
    at org.springframework.web.jsf.DelegatingVariableReso lver.resolveVariable(DelegatingVariableResolver.ja va:108)
    at com.sun.faces.el.impl.NamedValue.evaluate(NamedVal ue.java:125)
    at com.sun.faces.el.impl.ComplexValue.evaluate(Comple xValue.java:146)
    at com.sun.faces.el.impl.ExpressionEvaluatorImpl.eval uate(ExpressionEvaluatorImpl.java:244)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:173)
    at com.sun.faces.el.ValueBindingImpl.getValue(ValueBi ndingImpl.java:154)
    at javax.faces.component.UIOutput.getValue(UIOutput.j ava:147)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputR enderer.getValue(HtmlBasicInputRenderer.java:82)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.getCurrentValue(HtmlBasicRenderer.java:191)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeEnd(HtmlBasicRenderer.java:169)
    at javax.faces.component.UIComponentBase.encodeEnd(UI ComponentBase.java:712)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:443)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:440)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRender er.encodeRecursive(HtmlBasicRenderer.java:435)
    at com.sun.faces.renderkit.html_basic.GridRenderer.en codeChildren(GridRenderer.java:233)
    at javax.faces.component.UIComponentBase.encodeChildr en(UIComponentBase.java:693)
    at javax.faces.webapp.UIComponentTag.encodeChildren(U IComponentTag.java:600)
    at javax.faces.webapp.UIComponentTag.doEndTag(UICompo nentTag.java:537)
    at com.sun.faces.taglib.html_basic.PanelGridTag.doEnd Tag(PanelGridTag.java:460)
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_h_panelGrid_0(jsf_002dlayout_jsp.jav a:269)
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_h_form_0(jsf_002dlayout_jsp.java:222 )
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspx_meth_f_view_0(jsf_002dlayout_jsp.java:188 )
    at org.apache.jsp.WEB_002dINF.layout.jsf_002dlayout_j sp._jspService(jsf_002dlayout_jsp.java:99)
    at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332)
    at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:810)
    I could get the application work with JSF and Spring, without Tiles.
    Appreciate any help in this regard.
    Thanks

    I'm assuming that since you are using JSF and Tiles, you are not using Spring's web framework. In that case, the integration of Spring with JSF is relatively trivial and you can neglect it for now. You might want to try the link below, if you are feeling lucky:
    http://www.google.com/search?q=myfaces+tiles

  • Problems with JSF and included subviews

    Hi everybody,
    I' ve got a problem with JSF and included subviews which makes me going
    crazy. I've got no clue why my web-pages are represent wrongly. The only
    tip I've got is that it must be connected with the kind I do include my JSF-pages.
    When I use <%@file="sub.jsp"%> my pages are are represent right. When I use <jsp:include page="Sub.jsp" /> or <c:import url="Sub.jsp" /> ( mark: the usage of flush="true" or flush="false" doesn't matter )
    my pages are represent wrongly.
    The usage of tags like f:facet or f:verbatim were also included but didn't point to an solution.
    I searched the whole Sun Developer Forum and some other web-sites for any solution for my problem but the given hints and clues didn't help. Now I'm trying to post my problem directly in Sun's Forum in hope to get help.
    My environment is the following:
    JAVA JDK 1.5 Update 4
    Tomcat 5.5.9
    JSLT 1.1
    Sun JSF 1.1
    Win 2K
    Here's my code:
    Main.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%
              String path = request.getContextPath();
              String basePath = request.getScheme() + "://" + request.getServerName()
                        + ":" + request.getServerPort() + path + "/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="<%=basePath%>">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <f:view>
              <h:form>
                   <div class="table">
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 1"/>
                             <h:outputText styleClass="tdinfo" value="value 2"/>
                        </div>
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 3"/>
                             <h:outputText styleClass="tdinfo" value="value 4"/>
                        </div>
                   </div>
              </h:form>     
              <jsp:include page="Sub.jsp" />
         </f:view>
    </body>
    </html>Sub.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <f:subview id="subview">
         <h:form>
              <div class="table">
                   <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 11"/>
                             <h:outputText styleClass="tdinfo" value="value 22"/>
                   </div>
                   <div class="tr">
                        <h:outputText styleClass="tdleft" value="value 33"/>
                        <h:outputText styleClass="tdinfo" value="value 44"/>
                   </div>
              </div>
         </h:form>
    </f:subview>stil.jsp
    <%@page contentType="text/css"%>
    <%
        String  schwarz     = "#000000",
                grau1       = "#707070",
                grau2       = "#c0c0c0",
                grau3       = "#e0e0e0",
                grau4       = "#e8e8e8",
                grau5       = "#fdfdfd",
                blau        = "#0000dd",
                tuerkis     = "#00cfff";
        String  liniendicke = "1px",
                linienart   = "solid";
        String allgemeineTextFarbe           = schwarz;
        String allgemeineHintergrundFarbe    = grau3;
        String infoTextFarbe                 = blau;
        String fieldsetRandFarbe             = blau;
        String fieldsetRandDicke             = liniendicke;
        String fieldsetRandArt               = linienart;
        String hrLinienFarbe                 = blau;
        String hrLinienDicke                 = liniendicke;
        String hrLinienArt                   = linienart;
        String inputAktivHintergrundFarbe    = grau5;
        String inputReadonlyHintergrundFarbe = grau4;
        String inputPassivHintergrundFarbe   = grau4;
        String inputPassivFarbe              = schwarz;
        String inputRandFarbe1               = grau1;
        String inputRandFarbe2               = grau5;
        String inputRandDicke                = liniendicke;
        String inputRandArt                  = linienart;
        String inputButtonHintergrundFarbe   = grau3;
        String legendenFarbe                 = blau;
        String linkFarbe                     = blau;
        String linkAktivFarbe                = tuerkis;
        String linkBesuchtFarbe              = blau;
        String linkFocusFarbe                = tuerkis;
        String objectGitterFarbe             = grau5;
        String objectGitterDicke             = liniendicke;
        String objectGitterArt               = linienart;
        String tabellenGitterFarbe           = grau5;
        String tabellenGitterDicke           = liniendicke;
        String tabellenGitterArt             = linienart;
    %>
    <%-- ----------------------------------------------- --%>
    <%-- Textdarstellung mittels der Display-Eigenschaft --%>
    <%-- in den Tags div und span                        --%>
    <%-- ----------------------------------------------- --%>
    *.table {
        display:table;
        border-collapse:collapse;
    *.tbody {
        display:table-row-group;
    *.tr {
        display:table-row;
    *.td,*.tdright,*.tdleft,*.tdinfo,*.th {
        display:table-cell;
        padding:3px;
        vertical-align:middle;
    *.td,*.th {
        text-align:center;
    *.tdright {
        text-align:right;
    *.tdleft {
        text-align:left;
    *.tdinfo {
        color:<%=infoTextFarbe%>;
        text-align:right;
    *.th {
        color:<%=infoTextFarbe%>;
        font-weight:bold;
    }thanks in advance
    benjamin

    Hello Zhong Li,
    many thanks for your post, but it didn't work.
    My problem is that the JSF-Components im my included or imported
    JSP-Pages does not accept any kind of style or styleClass for
    designing. The components take over the informations for colors
    but not for alignment.
    When I take a look at the generated JAVA-Source in $TOMCAT/WORK/WEBAPP for my sub.jsp ( sub.java )
    it seems that the resulting HTML-page would be presented correctly.
    But later when I start the application via Firefox or Mozilla the html-sourcecode is totally wrong.
    In my example I create a simple grid with 2 rows and 2 columns.
    Both columns contains JSF-Outtext-Components and are included with div-tags.
    The generated Sub.java shows that the text would be setted in the div-tags. Unfortunately the html-sourcecode represented by my browser shows that jsf-text is not setted in the tags but in the <h:form> tags. The div-tags are neither rounded by <h:form> nor containing the JSF-OutText-Components.
    Any clue?
    Many thanks Benjamin
    Here is the html-code from Firefox:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="http://polaris21:8080/webtest/">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <form id="_id0" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
              <div class="table">
                   <div class="tr">
                        <span class="tdleft">value 1</span>
                        <span class="tdinfo">value 2</span>
                   </div>
                   <div class="tr">
                        <span class="tdleft">value 3</span>
                        <span class="tdinfo">value 4</span>
                   </div>
              </div>
              <input type="hidden" name="_id0" value="_id0" />
         </form>     
          <form id="SUB:_id5" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
               <span class="tdleft">value 11</span>
              <span class="tdinfo">value 22</span>
              <span class="tdleft">value 33</span>
              <span class="tdinfo">value 44</span>
              <input type="hidden" name="SUB:_id5" value="SUB:_id5" />
         </form>
         <div class="table">
              <div class="tr">
              </div>
              <div class="tr">
              </div>
         </div>
    </body>
    </html>

Maybe you are looking for

  • Tag dhCont para SVC 3.10 com formato errado

    Olá pessoal, Aqui no projeto já estamos emitindo normalmente para versão 3.10 e no momento estamos tentando validar o SVC tbm para 3.10, para isso paramos o canal da SEFAZ de SP e deixamos apenas o do SVC. No monitor temos o erro 225 "Falha no Schema

  • Can I mirror my mac book pro with apple tv like i can do with my iPad 2?

    Cn I mirror my mac book pro with apple tv like i can do with my ipad2.

  • " Query in Crystal Report "

    Hai  friend's,   I am having a Multi-Provider,Which consists a combination of Info cubes. I have to link the Multi-provider to my Crystal report. Can you let me know the Procedure. After also let me know the procedure to Display the Crystal Report. I

  • How to enforce 72 chars/line in ABAP editor?

    Hello, While trying to transport a custom function module from 6.4 to 4.6C, I came to realize that 4.6C chops source lines after 72 characters. Is there a way to force a "word wrap" in 6.4 ABAP editor so that the code become compatible with 4.6C? Or,

  • HT204152 How to view app-specific password after generated

    I would like to enter app-specific password on my 2nd Mac, but I don't have a way to view the app-specific password generated earlier. I know I could generate another app-specific password for the same app. But it doesn't make sense if i couldn't vie