Issues in using JSF UI:Tree tag

Hi,
I am trying to work with Tree Structure using JSF UI tags. In Studio Creator i just created a JSP page and designed a Tree with two nodes under it. This is what i have in the body of my jsp.
<ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
<ui:form binding="#{Page1.form1}" id="form1">
<ui:tree binding="#{Page1.tree1}" id="tree1" style="left: 48px; top: 48px; position: absolute" text="L3">
<ui:treeNode binding="#{Page1.treeNode1}" expanded="true" id="treeNode1" style="width: 408px" text="Tree Node 1">
<f:facet name="image">
<ui:image binding="#{Page1.image1}" icon="TREE_DOCUMENT" id="image1"/>
</f:facet>
</ui:treeNode>
<ui:treeNode binding="#{Page1.treeNode2}" expanded="true" id="treeNode2" text="Tree Node 2">
<f:facet name="image">
<ui:image binding="#{Page1.image2}" icon="TREE_DOCUMENT" id="image2"/>
</f:facet>
</ui:treeNode>
</ui:tree>
</ui:form>
</ui:body>
But when i am trying to launch the jsp page from browser i am getting the below exception.
com.sun.rave.web.ui.appbase.ApplicationException
Caused by: java.lang.NullPointerException at java.io.File.(File.java:194) at com.sun.rave.web.ui.renderer.template.xml.XMLLayoutDefinitionManager.getLayoutDefinition(XMLLayoutDefinitionManager.java:142) at com.sun.rave.web.ui.component.TemplateComponentBase.getLayoutDefinition(TemplateComponentBase.java:150) at com.sun.rave.web.ui.renderer.template.TemplateRenderer.encodeBegin(TemplateRenderer.java:73) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
Any suggestion to solve this issue would be greatly helpful.

Now with Unified EL - JSTL and JSF tags are supposed to work on one page.
If you want to use Unified EL you need
1) A container that is built on Servlet 2.5 / JSP 2.1 , and example of such a container is Tomcat 6.x
2) Probably need to upgrade to JSTL 1.2 , and JSF 1.2
3) If you're upgrading the container to Servlet 2.5 then web.xml should conform to Servlet 2.5 version.
4) Use correct taglib URIs for JSTL 1.2 and JSF 1.2
Read here: Summary of new features in JSP 2.1
http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/index.html
JSP 2.1 Technology and JSF 1.2 Technology
http://java.sun.com/developer/community/chat/JavaLive/2004/jl1207.html
http://java.sun.com/products/jsp/index.jsp
Message was edited by:
appy77

Similar Messages

  • Issue in using JSF and tiles

    Hai,
    I am using JSF and tiles in my application along with richfaces 3.2 jar but the suggestion box does not work when i use incorporate tiles to the jsp page,Please help me out.Here is my code
    Content Page
    <%@ taglib prefix= "f" uri="http://java.sun.com/jsf/core"%>
    <%@ 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"  %>
    <%@ taglib uri="http://jakarta.apache.org/tiles"  prefix="tiles"  %>
         <f:view >
             <link href="<%=request.getContextPath()%>\styles\Form.css" rel="stylesheet" type="text/css"/>
             <link href="<%=request.getContextPath()%>\styles\Menu.css" rel="stylesheet" type="text/css"/>
             <link href="<%=request.getContextPath()%>\styles\Header.css" rel="stylesheet" type="text/css"/>
             <title><h:outputText value="Brand"/></title>
             <h:form id="testForm">
                 <tiles:insert definition="test_create" flush="false"/>
             </h:form>
         </f:view>JSP
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
    <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    </head>
    <f:subview id="come">
    <body>
    <h:form>
    <h:outputText value="Provider:" styleClass="SubTitle" />
    <h:inputText value="#{testMBean.property}" size="25" id="dpiSuggest" styleClass="SubTitle">
        <a4j:support event="onkeyup" />
    </h:inputText>   
    <rich:suggestionbox for="dpiSuggest" suggestionAction="#{testMBean.suggest}" height="180" width="180" var="suggest">
    <h:column>
    <h:outputText value="#{suggest.countryName}" />
    </h:column>
    <h:column>
    <h:outputText value="#{suggest.countryCode}" />
    </h:column>
    </rich:suggestionbox>
    </h:form>
    </body>
    </f:subview>
    </html>
    *tiles.xml*
    <tiles-definitions>
        <definition name="header-menu-content" path="/layout/basicLayout.jsp">
            <put name="gridClass"           value="headerMenuContent"/>  
            <put name="headerClass"         value="HeaderBgcolor"/>
            <put name="menuColumnClass"     value="MenuBorder"/>
            <put name="contentColumnClass"  value="BodyBgColor"/>
        </definition>
        <definition name="home" extends="header-menu-content">
            <put name="header"  value="/common/header.jsp"/>
            <put name="menu"    value="/common/menu.jsp"/>
            <!--<put name="buttonBar" value="/common/buttonBar.jsp"/>-->
            <put name="content" value="/common/home.jsp"/>     
        </definition>
        <definition name="error" extends="header-menu-content">
            <put name="header"  value="/common/header.jsp"/>
            <put name="menu"    value="/common/menu.jsp"/>
            <!--<put name="buttonBar" value="/common/buttonBar.jsp"/>-->
            <put name="content" value="/common/error.jsp"/>     
        </definition>
            <definition  name="test_create" extends="header-menu-content">
                 <put name="header" value="/common/header.jsp" />
                 <put name="menu" value="/common/menu.jsp" />
                 <!-- <put name="buttonBar" value="/common/buttonBar.jsp"/>-->
                 <put name="content" value="/test.jsp" />
             </definition>
        <tiles-definitions>
    *web.xml*
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>welcome.jsp</welcome-file>
            </welcome-file-list>
             <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
      </context-param>
      <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
      </context-param>
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
      </context-param>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
    <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>blueSky</param-value>
      </context-param>
    <filter>
      <display-name>RichFaces Filter</display-name>
      <filter-name>richfaces</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>
      </filter>
    <filter-mapping>
      <filter-name>richfaces</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      <dispatcher>REQUEST</dispatcher>
      <dispatcher>FORWARD</dispatcher>
      <dispatcher>INCLUDE</dispatcher>
      </filter-mapping>
            <servlet>
          <servlet-name>Tiles Servlet</servlet-name>
          <servlet-class>org.apache.tiles.servlets.TilesServlet</servlet-class>
          <init-param>
             <param-name>definitions-config</param-name>
             <param-value>/WEB-INF/tiles.xml</param-value>
          </init-param>
          <load-on-startup>2</load-on-startup>
       </servlet>
        </web-app>
    *facesconfig.xml*
    <?xml version="1.0" encoding="UTF-8"?>
    <faces-config version="1.2"
                  xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
        <navigation-rule>
                <navigation-case> <!-- Displayes the screen to add data -->
                <from-outcome>test</from-outcome>
                <to-view-id>/testContent.jsp</to-view-id>
                <redirect/>
            </navigation-case>
        </navigation-rule>
        <managed-bean>
            <managed-bean-name>testMBean</managed-bean-name>
            <managed-bean-class>testMBean</managed-bean-class>
            <managed-bean-scope>session</managed-bean-scope>
        </managed-bean>
      </faces-config>Edited by: SreeramIyer on May 29, 2008 4:50 AM

    Are you dead set on using tiles? I can see tiles including JSF but JSF including tiles? Not sure if that will work.
    My suggestion is to use Trinidad. It has the concept of Regions which is very "tiles" like and you will be far more successful.

  • How we can use jsf tags in included jsp enclosed in subview tags

    Hello everybody,
    I am developing web app by using jsf. I am including a jsp page "header.jsp" into another jsp page "main.jsp". The header.jsp page is enclosed in jsf subview tag on main.jsp page. The header.jsp contains some static html code and some jsf tags like "outputText". When i added tag library url in header.jsp then my app was not even not initiating and i was getting following exception
    ERROR [UIComponentTag] Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml.
    16:22:16,890 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
    ....Now i removed jsf tag library url from included jsp "header.jsp" so now my app is running but only static html data is being displayed but the value in the jsf tag "outputText" is not being printed in the browser
    kindly help me. i would be very thankful....

    Your question has nothing to do with Sun Java System Directory Server.
    Please use the right forum(s).
    Thanks

  • How to dynamically include jsp files using jsf el in include tag ?

    Hi,
    I'm trying to get the jsp file name from my backing bean to use it in an include tag but I can't make it work
    When using this piece of code I can get the generated path
             <h:outputText value="/_partial/#{myBean.jspName}.jsp"/>whereas in this code the jsf el is not replaced by this value.
            <%@ include file="/_partial/#{myBean.jspName}.jsp" %> Have you any idea of how to solve this ? I'm currently developing for J2EE 1.4 platform.     
    Thanks for your help,
    Regards.

    If you're using JSF 1.2 and JSTL 1.2 at a JSP 2.1 environment, then you can just use <jsp:include> with unified EL.
    If you're using JSF 1.1, then you may find this article useful [http://balusc.blogspot.com/2007/01/dynamic-jsf-subviews.html]

  • Using JSF and Struts

    I am a bit of a newbie in terms of UI applications on the JEE platform, so I apologize up front if this question seems silly. I was wondering if someone could comment on the approach below. Is this something that's possible or am I barking up the wrong tree?
    We have a vendor application that is written using Struts. We want to add a section of our own pages to this application, but we would rather use a more strategic approach in our pages, so we would like to use JSF for those.
    The original web.xml file in the vendor app uses a dtd of version 2.3 as shown below:
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    When I use JSF, I use a DTD version of 2.5 as shown here:
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    The problem is that when I use version 2.3, the elements needed to support JSF are invalid. When I use 2.5, the elements needed to support struts are invalid.
    Could someone comment in that, if you had this vendor app and you needed to add your own pages, is it not possible to use JSF in this scenario or if you can, what is the best approach to resolving this issue?
    Thank you in advance

    First make sure that your application server supports Servlet API 2.5. Whether the desired Servlet API version is supported or not solely depends on the application server implementation and version used. For example Tomcat 5.5 is a Servlet API 2.4 implementation which only supports the API versions up to with 2.4. If you want to use Servlet API 2.5, then you obviously need a Servlet API 2.5 implementation, for example Tomcat 6.0.
    Consult the website and/or documentation of the application server in question.

  • Getting img tags to work in sub page using jstl core import tag

    Am trying to bring disparate system page reports together under one web app. This means using the jstl core import tag (I dont want to redirect as I want to hide the urls, this web app provides better security than those it calls).
    Use of the import tag works to a degree but any resources (ie. img tags) don't load.
    Have created a much simplified example that demonstrates..
    So heres the jsp...
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <h3>Delivery Performance Report</h3>
    <c:url value="http://localhost/mycontext/subpage.html" var="myUrl"/>
    <c:import url="${myUrl}" />and a simple sub page (note plain html, no jsp, this mimics my project as the other systems are hidden source, non jsp)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    <HEAD>
    <TITLE>sub page</TITLE>
    </HEAD>
    <BODY>
         This is the sub page<br>
         <img src="images/banner_image.jpg" />
    </BODY>
    </HTML>While I dont get any errors what I do get is ..
    Delivery Performance Report
    This is the sub page
    ...but image fails to load.
    If I redirect instead of import it works, but as I said I need to hide the url from the user as security is an issue.
    Any help appreciated, really pulling my hair out with this final stage of something that will make a real difference to us!
    regards,
    G.

    Thanks for the answer but Im afraid thicko here doesnt get it.
    The img src is relative to the sub page, and I have tried it with an absolute address (ie. http://localhost/.....) with the same result.
    If I call the sub page direct (get with browser) the image tag works. Its just if the sub page is imported with the jstl core import tag.
    I've not tried a base tag. The real project always returns pages containing absolute urls... http://ourReportServer/reports?....plenty of params so dont belive relevant, please correct me if Im wrong here though.
    thanks, G.

  • Problem in using AdvanceDataGrid as tree with drag n drop functionality

    Hi All,
    I am using AdvancedDataGrid as tree for displaying my data. Within this ADG tree I have to enable drag n drop i.e. user can select one node and will able to drop that on another node within tree.
    Overwritten dragDrop handler event for ADG.
    Issues: Not getting target node on which I am dropping currently selected node.

    Please don’t use this forum for support questions, go use flexcoders or the Adobe forums instead.
    Matt
    On 2/10/09 11:21 PM, "rakess" <
    [email protected]> wrote:
    A new discussion was started by rakess in
    Developers --
      Problem in using AdvanceDataGrid as tree with drag n drop functionality
    Hi All,
    I am using AdvancedDataGrid as tree for displaying my data. Within this ADG tree I have to enable drag n drop i.e. user can select one node and will able to drop that on another node within tree.  
    Overwritten dragDrop handler event for ADG.
    Issues: Not getting target node on which I am dropping currently selected node.
    View/reply at Problem in using AdvanceDataGrid as tree with drag n drop functionality <
    http://www.adobeforums.com/webx?13@@.59b7e11c>
    Replies by email are OK.
    Use the unsubscribe <
    http://www.adobeforums.com/webx?280@@.59b7e11c!folder=.3c060fa3>  form to cancel your email subscription.

  • [ADF] Having Difficulties in Figuring Out Using the af:selectInputText Tag

    This is my first time using the ADF tags.
    The <af:selectInputText> is an input component that can launch a dialog and automatically accept its return value.
    My pop-up is a data table that provides "code" and "description". And the selection made will be return to the parent page and the "code" will be populated in the input field.
    First, I tested if my data table can be constructed successfully. Yes, I am able to use the JSF <h:dataTable> tag to display without problem.
    Second, I have adf-faces-api-10_1_3_0_4.jar and adf-faces-impl-10_1_3_0_4.jar in my WEB-INF/lib directory.
    Third, my web.xml and faces-config.xml work well because I was able to render JSF tags.
    Fourth, I have created the adf-faces-config.xml file with its contents directly copied from the ADF Configuration web site. The adf-faces-config.xml is placed together with the web.xml and faces-config.xml files.
    Fifth, on top of my ***.jsp, I added
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/EA10" prefix="af" %>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/EA10/html" prefix="afh" %>
    However, the IDE says that <af:selectInputText ...> is an unknown tag.
    Besides, for the value of the "action" attribute of the <af:selectInputText ...>, what is supposed to be filled for the "dialog:?????"
    and the compiler starts complaining that the "value" attribute in my <h:dataTable ...> has no value! But, my <h:dataTable ....> worked well before I introduced ADF.
    Here is my code in the ***.jsp:
         <f:view>
              <h:form>
                     <af:selectInputText label="Sex: " id="idInputText"
                       value="#{listOfValuesManagementBean.selectedGender}"
                    popupTitle="Sex Types"
                        action="dialog:????????????" windowWidth="300" windowHeight="200">
                       <h:dataTable id="gender" value="#{listOfValuesManagementBean.genderTypes}" var="genderType">
                            <h:column>
                                 <f:facet name="header">
                                      <h:outputText value="Code"/>
                                 </f:facet>
                                 <h:outputText value="#{genderType.code}"/>
                            </h:column>
                            <h:column>
                                 <f:facet name="header">
                                      <h:outputText value="Description"/>
                                 </f:facet>
                                 <h:outputText value="#{genderType.description}"/>
                            </h:column>                   
                       </h:dataTable>
              </af:selectInputText>             
              </h:form>
         </f:view>

    I use IBM Rational Application Developer (RAD v.7)
    As you know that my JSF code had worked before I started introducing ADF tags.
    Now, I have resoved all the complilation complaints in my ***.jsp where I have the ADF <af:selectInputText ...> tag and all tags inside the <af:selectInputText ...> tag.
    But, I have the "Error 500: Cannot find FacesContext" in the browser when I run the ***.jsp.
    I believe it is in my web.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" 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_4.xsd">
         <display-name>
         ADF_TEST</display-name>
         <context-param>
              <description>
              The location where state information is saved.
    Valid values are 'server' (typically saved in HttpSession) and 'client' (typically
    saved as a hidden field in the form.
    Default is server.</description>
              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
              <param-value>client</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.CONFIG_FILES</param-name>
              <param-value>/WEB-INF/faces-config.xml</param-value>
         </context-param>
         <context-param>
              <description>
              The default suffix for extension-mapped resources that contain JSF components.
    Default is '.jsp'.</description>
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
              <param-value>.jsp</param-value>
         </context-param>
         <context-param>
              <description>
              Number of Views to be stored in the session when Server-Side State Saving is being used.
    Default is 15.</description>
              <param-name>com.sun.faces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
              <param-value>15</param-value>
         </context-param>
         <context-param>
              <description>
              If set to true while server-side state saving is being used, a serialized representation
    of the view is stored on the server. This allows for failover and sever clustering support.
    Default is false. This parameter is not available in JSF 1.0.</description>
              <param-name>com.sun.faces.enableHighAvailability</param-name>
              <param-value>false</param-value>
         </context-param>
         <context-param>
              <description>
              If set to true while client-side state saving is being used, reduces the number of bytes
    sent to the client by compressing the state before it is encoded and written as a hidden field.
    Default is false. This parameter is not available in JSF 1.0.</description>
              <param-name>com.sun.faces.COMPRESS_STATE</param-name>
              <param-value>false</param-value>
         </context-param>
         <context-param>
              <description>
              Monitors Faces JSP files for modifications and synchronizes a running server with
    the changes without restarting the server. If this parameter is set to false or
    removed from the deployment descriptor, any changes made to Faces JSP files may
    not be seen by the server until it is restarted. This parameter is usually set
    to true while the Faces JSP files are being developed and debugged in order to
    improve the performance of the development environment.</description>
              <param-name>com.ibm.ws.jsf.JSP_UPDATE_CHECK</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <description>
              Load JSF runtime when the application server starts up. If this parameter is set to false or removed,
    JSF runtime will be loaded and initialized when the first JSF request is processed.
    This may disable custom JSF extensions, such as factories defined in the project.</description>
              <param-name>com.ibm.ws.jsf.LOAD_FACES_CONFIG_AT_STARTUP</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <description>
              If set to true disables use of MultipartFacesContext, allowing underlying implementations to be used.
    MultipartFacesContext is required when the FileUpload component is used, and can be disabled otherwise.</description>
              <param-name>com.ibm.faces.DISABLE_JWL_MULTIPART_CONTEXT</param-name>
              <param-value>false</param-value>
         </context-param>
         <context-param>
              <description>
              Value, in milliseconds, to be used for Expires header for resources served by the JavaScript Resource Servlet.
    Default is never (31536000000 milliseconds or 1 year).</description>
              <param-name>com.ibm.faces.RESOURCE_EXPIRE_MS</param-name>
              <param-value>31536000000</param-value>
         </context-param>
         <context-param>
              <description>
              Defines the strictness of the conversion when converting from a string to a date.
    The higher the value, the more exactly the value must conform to the format.
    If 0 (liberal), all 'literals' are ignored while parsing a value, mis-ordered components will be rearranged,
    any missing component is supplied using the current datetime, misspellings and incomplete spellings are allowed
    (to the extent that they can be evaluated), 'E' and other non-unique components are ignored.
    If 1 (strict), all 'literals' are ignored while parsing a value, any missing component is supplied using the current
    datetime, misspellings and incomplete spellings are allowed (to the extent that they can be evaluated),
    'E' and other non-unique components are ignored. For example if the pattern is MMMM dd, yyyy a user can enter 'Feb/02/04'
    and it will be parsed as February 02, 2004.
    If 2 (very strict), an exact match is required except long month names can be 'shortened' to the minimum number of unique
    characters and 'E' and other non-unique components are ignored. Literals must match exactly.
    Default is 1.</description>
              <param-name>com.ibm.faces.DATETIME_ASSIST_STRICTNESS</param-name>
              <param-value>1</param-value>
         </context-param>
         <context-param>
              <description>
              Defines the strictness of the conversion when converting from a string to a number.
    The higher the value, the more exactly the value must conform to the pattern.
    For numbers, currently strictness levels of 0 and 1 are equivalent. If the strictness is 2,
    if number is signed, the sign must be provided (otherwise it's assumed positive).
    Default is 1.</description>
              <param-name>com.ibm.faces.NUMBER_ASSIST_STRICTNESS</param-name>
              <param-value>1</param-value>
         </context-param>
         <context-param>
              <description>
              Defines the path for resources such as JavaScript libraries and images.
    The value can be either:
    1. An empty string. Context path of the current application will be used.
    2. A path string. Example: /project13. A number. Specifies the number of nodes to use from the context path starting from the left.
    Example: With a value of 1 if the context path is /screen/faces/SSID110267549/RID1102676
    the path will be evaluated as /screen
    Default is an empty string.</description>
              <param-name>com.ibm.faces.USE_UNENCODED_CONTEXT_PATH</param-name>
              <param-value></param-value>
         </context-param>
         <context-param>
              <description>
              Sets a custom url-pattern for the JavaScript Resource servlet.
    Should match servlet mapping setting for the JavaScript Resource servlet. If the default default mapping
    value '/.ibmjsfres/*' is modified, this context-param should also be modified.
    </description>
              <param-name>com.ibm.faces.JS_RESOURCE_SERVLET_URL_PATTERN</param-name>
              <param-value>/.ibmjsfres/*</param-value>
         </context-param>
         <context-param>
              <description>
              If set to true, forces JavaScript Resource Servlet to cache all resources on the server.
    This can be useful when client-side caching is turned off.</description>
              <param-name>com.ibm.faces.JS_RESOURCE_SERVLET_CACHE</param-name>
              <param-value>false</param-value>
         </context-param>
         <context-param>
              <description>
              Sets a custom charset mapping properties file similar to converter.properties in WAS.</description>
              <param-name>com.ibm.faces.ENCODING_MAPPING</param-name>
              <param-value>converter.properties</param-value>
         </context-param>
         <context-param>
              <description>
              Number of Views to be stored in the session when Enhanced State Saving is being used.
    Default is 15.</description>
              <param-name>com.ibm.faces.ENHANCED_SERVER_STATE_SAVING_SESSION_STORED_VIEWS</param-name>
              <param-value>15</param-value>
         </context-param>
         <context-param>
              <description>
              If set to true, the entire JavaScript library, containing code for all components, will be included
    in the generated pages as one file. If set to false or removed, multiple smaller JavaScript files will be
    included, depending on the components used on the page.Default is false.</description>
              <param-name>com.ibm.faces.USE_HXCLIENT_FULL</param-name>
              <param-value>false</param-value>
         </context-param>
         <listener>
              <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
         </listener>
         <servlet id="Servlet_1181745021880">
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>
              javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup> 1 </load-on-startup>
         </servlet>
         <servlet id="Servlet_1181745029380">
              <servlet-name>JavaScript Resource Servlet</servlet-name>
              <servlet-class>
              com.ibm.faces.webapp.JSResourceServlet</servlet-class>
              <load-on-startup>-1</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>/faces/*</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.faces</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>JavaScript Resource Servlet</servlet-name>
              <url-pattern>/.ibmjsfres/*</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>and my ***.jsp looks like:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af" %>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Test the ADF selectInputText Tag</title>
    </head>
    <body>
         <f:view>
              <h:form>
                    <af:selectInputText label="Sex: " id="idInputText"
                       value="#{listOfValuesManagementBean.selectedGender}"
                        action="dialog:chooseGender" windowWidth="300" windowHeight="200">
                       <af:table id="gender" value="#{inputListOfValuesManagementBean.genderTypes}" var="genderType">
                            <af:column>
                                 <f:facet name="header">
                                      <af:outputText value="Code"/>
                                 </f:facet>
                                 <af:outputText value="#{genderType.code}"/>
                            </af:column>
                            <af:column>
                                 <f:facet name="header">
                                      <af:outputText value="Description"/>
                                 </f:facet>
                                 <af:outputText value="#{genderType.description}"/>
                            </af:column>                   
                       </af:table>
                   </af:selectInputText>
              </h:form>
         </f:view>
    </body>
    </html>Message was edited by:
    user537770

  • How to create JSF UIComponent tree before rendering phase?

    Hello,
    The JSF lifecycle create the JSF UIComponent tree (I mean : parsing the JSP to buid the JSF component tree) during the restore phase if the request is a postback else during the render phase.
    In my application, I need to link JSF component with error message (coming from business layer) like :
    FacesContext.getCurrentInstance().addMessage("form1:v1", new FacesMessage("Test!"));To do that, the JSF component with the Id"form1:v1" must exist! And that not the case if the request is not a postback.
    A solution should be to build the JSF component tree just before the rendered phase by implementing the a custom PhaseListener. But i dont know how to force JSF to build the JSF component tree?
    Is it possible? Other solution?
    Thanks!
    JPL

    Sniff! no answer!
    May be I have to explain more my issue?
    JPL

  • JSF 2.0 tag library as distributed is incomplete?

    Hi all,
    I've spent a good chunk of 2 days at this and i'm pulling my hair out as i speak. I've installed mojarra 2.0.3 FCS in my Netbeans 6.7.1 installation. I now tried to use the <h:head> tag but for some reason, i keep getting a "org.xml.sax.SAXException: No tag "head" defined in tag library associated with uri "http://java.sun.com/jsf/html"" meaning the tag/tag handler does not exist in the package. I've downloaded every other build of mojarra on the site with the same results. my declaration goes :
    <jsp:root version="2.1" xmlns:x="http://www.w3c.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:df="http://java.sun.com/jsf/dynamicfaces" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:p="http://primefaces.prime.com.tr/ui" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    i'm using dynamic faces, primefaces and woodstock in this project. the other html jsf tags are available except h:head which i need. what am i doing wrong? please help me out here. i 've exhausted my little mind @ this.

    Moderator advice: Please don't post to threads which are long dead, and don't hijack another poster's thread. When you have a question, start your own thread. Feel free to post a link to a related thread.
    Moderator action: Locking this thread.
    db

  • Using JSF and IFRAMEs

    I have a basic JSF app that takes some input, does a request and creates a table on output. What I need to do with it now is to have the query "page" and results "page" in two iframes on the same page. Before the query has been run the second iframe should just be blank (or with some default text). After the query that frame should be populated but the query frame needs to still be there. I've managed to do part of this. The "search" page and the "results" page are in separate iframes:
    <%@ page session="true" %>
    <html>
    <head>
      <title>Frames</title>
    </head>
    <body>
    <table>
      <tr>
        <td width="100%" colspan="2">
          <iframe title="Synonyms Search" src="search.jsf"
              width="800" height="200">
          Alternate search content...
          </iframe>
         </td>
      </tr>
      <tr>
      <td width="100%">
        <iframe src="results.jsp" title="Results"
          width="800" height="800">
          Results....
        </iframe>
      </td>
      </tr>
    </table>
    </body>
    </html>The reason this page is not using jsf tags is that the iframes will need to contain other pages that themselves are not jsf (mostly servlets) and I wasn't sure I could make that work. Currently the problem is that previously the search page had a QueryBean that the results page accessed to create it's table of results. Now in iframes the results.jsp frame just has a jsp processing exception and running the query does nothing. I'm new to JSF so I'm sure there's parts I'm missing, these do work if I pull them outside the frames and write navigation rules in the faces-context.xml file.
    Thanks,
    Sarah

    nigeldeakin wrote:
    The first thing to ask is whether you are sure that
         @Resource(name = "jms/QueueConnectionFactory",mappedName = "queueConnectionFactory")
         private ConnectionFactory connectionFactory;is valid. Does it work when you use it in other places?No it is not working still giving me NullPointerException for it. I'm using JBoss AS and having hard times deploying a jms queue on it i used an xml file to configure the queue and here is the file
    <?xml version="1.0" encoding="UTF-8"?>
    <server>
         <mbean code="org.jboss.jms.server.destination.QueueService"
              name="jboss.messaging.destination:service=Queue,name=StockHistoryQueue"
              xmbean-dd="xmdesc/Queue-xmbean.xml">
              <depends optional-attribute-name="ServerPeer">
                   jboss.messaging:service=ServerPeer
             </depends>
              <depends>jboss.messaging:service=PostOffice</depends>
         </mbean>
    </server>i think it's not working because i have this null exception for queue factory.

  • Use of h:inputHidden tag

    I'm new to JSF and I have a product which using Struts frame work and I need to move it to JSF. I'm struggling to find out how to set a value to a property of a bean from the JSP page without exposing the value to the user.
    In the Struts I set the value fro the action property as follows:
    <td width = "1"><html:hidden property="action" name="MyBean" value = "add"/></td>
    I'm not sure how I can do the samething in JSF since JSF "<h:inputHidden" tag does not have "property" element.
    <h:inputHidden id="action" value="add"/>
    Below is the definition of the bean that I'm using.
    Please help.
    John
    public class MyBean {
    // Some data captured from the form
    private String action;
    pulbic String process() {
         String outcome = null;
         if ("add".equals(action) {
              // outcome = add the data
         } else if ("update".equals(action) {
              // outcome = update existing data
         } else else if ("delete".equals(action) {
              // outcome = delete existing data
         } else {
              // unsupprted action
         return outcome;
    }

    That effect can sometimes occur if a post has been edited by a host. Can you tell if any changes been made to the original post since you replied to it, Robert?

  • Getting Substring using JSF

    I am new to JSF , (using JSF and struts application ) .I was wondering how I could do basic functions like string manupilation using the JSF core tages ...
    For Example if I have
    <h:outputText value="#{gen.Name}" />
    and I would like to get not the name but say the substring(0,5) ..how would I do this with JSF ...
    Also could you please direct me to a resource where I can learn more about the Core (helpful) functions using JSF

    Perhaps you could use a converter.
    package com.test.converter;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    public final class SubstringConverter implements Converter  {
        public SubstringConverter() {
            super();
        public Object getAsObject( FacesContext arg0, UIComponent arg1, String d ) {
            return d;
        public String getAsString( FacesContext arg0, UIComponent arg1, Object arg2) {
            return ((String)arg2).substring(0,5);
    The corresponding entry in faces-config.xml
    <converter>
        <converter-id>mySubstringConverter</converter-id>
        <converter-class>com.test.converter.SubstringConverterr</converter-class>
    </converter>
    Now use it!<h:outputText value="#{gen.Name}" converter="mySubstringConverter"/>

  • Using JSF in search engine.

    Hi,
    I am implementing a search engine. I want to use jsf for for the UI part. I have few queries in this regard.
    - Has anybody used jsf for the same?
    - Since the search result may contain any number of result, then it is not good to first load all the results into a List object and then do the pagination.
    Cheers...

    Hi Tom,
    I am currently involved in developing a web front end for our book search engine. We used JSF and though we had some issues initially, we are pretty happy with the results. You can check it out at http://books.infact.com.
    As for pagenation, the fetching of results (including number of results retrived each time, total count of results etc) should be handled by the back end of your search engine, in my opinion. The JSF part should communicate with the backend to get the number of results it needs to display. Hope that helps.

  • Using JSF in High Available Applications

    Hi
    I have a client that requires that all their applications are HA. For this I need to deploy my web applications in multiple servers and enable web session replication between those servers. I'm concerned that using JSF will require a lot of session replication between the servers because all components for all forms are stored in the web session. Has anybody done test using session replication? Any experience with this?

    There is a context param in the web.xml
    javax.faces.STATE_SAVING_METHOD
    Which stores the component tree in a hidden field in your HTML perhaps this can help you

Maybe you are looking for

  • Baseline Date after a change in Terms

    Dear Experts, I am having a problem where trying to change the term of payment of an invoice before a posting, the account doesnt set the baseline date correctly. This issue occurs for baseline date type 'Entry Date' . After whichever interaction in

  • IPad set up

    I bought iPad yesterday. Downloaded latest iTunes. Plugged in the USB to the computer. Plugged in the connection to the iPad. Message popped up on my computer screen: This iPad cannot be used because the Apple Mobile Device service is not started. Wh

  • DVD burner jerking me around

    When I burn home movies with my iMac - either through iDVD or Toast - for some reason in the last couple days the results are awful. The playback DVD jerks movement consistently, not randomly. Almost like we are looking at the action with every other

  • Combining music with a slide show dvd

    I just purchased a photo DVD on shutterfly but I need to add music then burn a new dvd, is there any software from apple that will let me do this?   Windows XP     Windows XP  

  • Failed (10) error on attempted export from QTPro 7.1.3

    I created a movie to play on my new 5G iPod using the video capture in QTPro with H.264 setting. I then tried to export in iPod format and received error message: Failed (10). Where did I go wrong?