JSF (richfaces) component + JSTL forEach

Hi,
I'm using MyFaces implementation of JSF 1.2, together with RichFaces components, and inside a <rich:dataTable>'s <rich:column> I want to iterate over a Set, which is a property of the variable of the dataTable. Something like
<rich:dataTable var="myvar">
<rich:column>
   <c:forEach var="innerVar" values="${myVar.mySet}"
       ${innerVar}
   </c:forEach>
</rich:column
</rich:dataTable>But it doesn't work. myVar seems to be empty for c:forEach. The odd thing is that if I place the following code inside the <rich:column>
<c:if test="${empty myVar">
        ${myVar.class.name}
</c:if>the name of the class is outputted. I also tried # isntead of $, with no success.
I tried iterating over a list in a declared backing bean, and it worked fine. So the question would go like this - how do I make this variable accessible for jstl tags' expressions.
Edited by: Glammy on Mar 2, 2009 9:36 AM

and why wouldn't you use a getter which does the transformation from Set to List just for the UI layer:
public List<InnerVar> getInnerVarList() {
   // transform Set into a List<> here
} and then in the UI:
<rich:column>
   <ui:repeat var="innerVar" values="#{innerVarList}"
       #{innerVar}
   </ui:repeat>
</rich:column>

Similar Messages

  • Error  while working with JSF SelectOneMenu and JSTL forEach Tag

    Hello,
    I have set up few things in ArrayList in my contextListener as like below
    ServletContext context=event.getServletContext();
    List list=new ArrayList();
    list1.add("Honda");
    list1.add("Mazda");
    list1.add("eClipse");
    context.setAttribute("carList", list)
    I just wanted to display the list in my JSF page, I wrote the below statements in my JSF page
    <h:selectOneMenu value="{com.carSelection}">
    <c:forEach var="car" items="${applicationScope.carList}" >
    <f:selectItem itemLabel="${car}"/>
    </c:forEach>
    </h:selectOneMenu>
    I am getting the below exception
    org.apache.jasper.JasperException: /pages/protected/cmt/index.jsp(23,2) According to TLD or attribute directive in tag file, attribute itemLabel does not accept any expressions
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
    org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1124)
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:819)
    org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
    org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator
    Could some one help to solve this error (Or) How should I display from my applicationScope list into MenuItems ?
    Edited by: Saravvij on Apr 9, 2008 8:37 PM
    Edited by: Saravvij on Apr 9, 2008 8:38 PM

    Hi,
    get your original message source from SXMB_MONI
    (right click - view source ) then paste your message to your message mapping (Test Tab) in the Integration Repository
    test your mapping and check if it's ok
    Regards,
    michal

  • JSF custom component

    Hi
    I have created a JSF cutom component , which has some javascript files. If i use the component within the same project my path for accessing the JS files is :- js/task.js (Its in public/html folder) .
    My problem is that when I use this custom component in some other project i am not able to access the js file ( Js file are deployed with other source file in ADF Library Jar) . As I have to hard code the path of JS files in the render can any one please tell me what will be the path for accessing the JS files.
    i heard ADFLibraryFilter is used for the purpose. Anyone please shed more light on it.

    Thanx Frank for your help .
    I am generating html from the rendererm, in the encodeBegin method i have now written <script type="text/javascript" src="adflibResources/js/task.js"></script>
    But still the script isn't loading on the page
    I added the following code in web.xml but Jdeveloper (Studio Edition Version 11.1.1.1.0) is complaining that "refernce oracle.adf.library.webapp.LibraryFilter and oracle.adf.library.webapp.ResourceServlet not found. I am using Fusion Web Application (ADF) as the application template.
    <filter>
    <filter-name>ADFLibraryFilter</filter-name>
    <filter-class>oracle.adf.library.webapp.LibraryFilter</filter-class>
    <init-param>
    <param-name>provider-lazy-inited</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ADFLibraryFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>adflibResources</servlet-name>
    <servlet-class>oracle.adf.library.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>adflibResources</servlet-name>
    <url-pattern>/adflib/*</url-pattern>
    </servlet-mapping>

  • JSF 1.2 + JSTL 1.2 + JSP 2.1

    am using netbeans 6.0 beta and glassfish.
    can i assume it has all JSF 1.2 + JSTL 1.2 + JSP 2.1 since it is the latest.

    i checked in the project properties>linraries>add jar file>
    in the folder i found JSF 1.2 JSTL 1.1 and nothing to do with JSP
    on googling i got: A GlassFish Build includes an implementation of the JSP 2.1
    on where to download JSTL 1.2 , i have no idea.
    glassfish.
    secondly. do i need to add those jar file to the project or the netbeans includes them when compiling.

  • JSF Declarative Component

    hi every body
    i am using Oracle Jdeveloper 11g release 2
    i wanted to create a Calendar Component
    for this i used JSF Declarative Component
    i added a RichInputText to page and a Button for opening calendar Dialog
    when for first time i open Calendar Dialog and select a day ,
    value of this day return to RichInputText truly but
    when i wanna to open it for second time that has an error
    error is:
    Error:dateValue is Read only
    i have to tell you dateValue is name of Attribute on JSF Declarative Component
    can anybody help me?

    i found a solution for this problem
    thanks

  • JSF Menu Component

    Hello Suners,
    I'm developing a JEE application and using mojarra jsf implementation. I need to find a JSF Menu component that i can use in my app.
    Regards,

    abulseed wrote:
    I need to find a JSF Menu component that i can use in my app.You would be better off creating your menus using Cascading Style Sheets (CSS). JSF menuing often involves JavaScript of some sort which won't work if the user has JavaScript turned off. CSS menuing guarantees that your menu always work (even with Javascript turned off) and it's better by design, not to mention less annoying to users.
    Googled for 'CSS menu' - there are heaps of examples out there that you can use.
    Edited by: user2412 on Apr 5, 2011 12:30 AM

  • JSF table component with paging

    Are you aware of any existing JSF table component with both navigation and paging ?
    I want to display the content of a database table with a large number of rows. The table component should be able to navigate through the entire table content, but building only a small ResultSet and dinamically populate it with data as we perform navigation.
    Thanks,
    Cosmin

    Thanks for the answer.
    But data scroller just takes a ResultSet and display it with navigation. It doesn't know about the total number of rows in the table. It only display the number of records in the ResultSet.
    What I am looking for is a data scroller which based on some input parameters knows how to split the table in several ResultSets, dinamically change the ResultSet and display the total number of rows in the table and not in the current ResultSet.

  • JSF Tab component and Dynamic Faces AjaxZone

    Has anyone tried to use a JSF Tab Component in a Dynamic Faces Ajax Zone. I would like to try to have a page that has a list of the alphabet, each tab being one letter and then adding terms an definitions to each tab. Do you have any comments or suggestions regarding doing this. I am at a loss as to how to make the tab component respond when clicking on it in the ajaxZone. any help would be appreciated. thnx

    The Scales and Tomahawk libraries provides a tabbed panel.
    But basically tabs are nothing less or more than a bunch of block elements layered over each other with the same amount of buttons or links at the top. If a tab click doesn't require a trip to the server, then you can just load all tab blocks at once and use Javascript+DOM to switch between tab blocks, e.g. one block should be displayed using element.style.display='block' and all other blocks should be hidden using element.style.display='none'. If a tab click require a trip to the server (to preinitialize stuff or so), then you can use the 'rendered' property of the tab block element (which can be <h:panelGroup style="display:block;" rendered="#{myBean.showTab == 1}" /> or so).
    For styling of the tab blocks and tab buttons/links just use CSS.

  • JSF Calendar Component JS error

    Hi everyone,
    I have problem with JSF Calendar component. JSP version is 1.2 so we are using com.sun.rave.web.ui.component.Calendar class.
    When HTML code is generated some id missing. For example:
    JavaScript tries to find subForm:startCalendar:_datePicker:row5, but there is only subForm:startCalendar:_datePicker:row4.
    This cause JS error at line 249 in calendar.js:
    this.lastRow = document.getElementById(rowId);
    this.lastRow.style.display = "none"; //error is here this.lastRow is nullAfter few reloads and manual date change calendar seem to work fine for a while, but it can stop at anytime. There are no errors in Tomcat logs (we are using Tomcat 5.5, but we have same error with Glassfish 2).
    Here is JSP code:
    <ui:calendar binding="#{Index.startCalendar}" dateFormatPattern="dd.MM.yyyy" id="startCalendar" style="position: absolute; left: 120px; top: 96px"/>

    I had observed that the code for UI:Calendar Component looks up defaulttheme.jar file which will be avaialble with Sun studio creator or with UI tag jars ...... for its JS files, Images and style sheets etc .
    I tried seeing the contents in the JS files and there is a JS file specifically for Calendar Component ie calendar.js ... editing the same i came to see this
    // This does not work for August (08) and September (09) but it works
    // for all the other months????
    function ui_Calendar_setCurrentValue() {
        var curDate = this.field.value;
        var matches = true;
    but cant see Feb month there...
    It the problem with the code in teh JS file that they are using to generate the component...
    sooo the only solution would be to get the latest jars fixing that issue (defaulttheme.jar)
    I tried googling out for teh latest jars for the same i coudnt find any such...
    This is my investigation on this issue.Hope only code fix kills the flaw
    If any one gets a solution or workaround pls post ASAP to help us.+
    Edited by: Shivaji. on Feb 3, 2009 4:44 AM

  • Jsf datatable component + java.sql.SQLException

    I get the following error when implementing a JSF DataTable component using
    JDeveloper 10.1.3.1.
    javax.faces.FacesException: java.sql.SQLException: Io exception: Socket closed
    I am able to follow the article in this link:
    http://www.oracle.com/technology/oramag/oracle/06-jan/o16jsf.html
    I can get the table generated, but it occurred to me that the example in this article does not include logic to close the statement, resultset, and connection. Sure enough, I jumped out to the database and there were numerous inactive connections hanging around from my application.
    I added the following code before the return null statement from the article:
    finally {
    try {
    rs.close();
    stmt.close();
    c.close();
    catch (Exception e) {
    System.out.println("after close");
    So I need to know the proper procedure to closing the resultset, statement, and connection using a jsf datatable component.

    You need to make sure you're using the Oracle9i JDBC driver, or using the Oracle 8.1.7.2 JDBC driver as I mentioned above.
    If you are using JDeveloper9i release 9.0.2 or 9.0.3, the driver you need is in <jdevhome>\jdbc\lib
    Otherwise, you can also download the drivers from OTN.

  • Can't instantiate JSF Custom Component

    I'm hoping some of you expert (or at least seasoned) JSF custom component developers might be able to lend some insight into the "Can't instantiate class" problem. I have a custom component which extends another component (which happens to be Oracle ADF's panelGroup), and I've verified that everything is in place:
    1. Component class uses correct component type referenced by faces-config.xml and tag class
    2. Renderer type referenced in faces-config.xml matches that of the renderer type in component class
    3. There is a default constructor (no args) for the component class, which also sets the renderer type
    4. TLD with tag is correct
    All classes are definitely in the classpath, as I have another custom component in the same packages which loads and is used just fine.
    Any ideas would be appreciated.
    Thanks,
    Shawn Bertrand
    Tyco Electronics

    So, is no one else having any problems when using the new JSF components from Java Studio Creator 2 in their existing projects? I can make simple projects in Creator and run them on PointBase and Tomcat and can deploy and run from Eclipse using MyEclipse but I cannot get my existing project working and I am wondering if their is some sort of conflict between the new JSF components and legacy Struts stuff in that project or if perhaps Spring is someone interferering. Kind of at a loss right now...

  • Tooltip on the header of JSF table Component

    How to add an Tooltip to the header of the JSF table copmponent?
    Please reply....

    You normally use the HTML 'title' attribute for this. Almost every JSF HTML component also supports it.

  • JSF Iterator Component

    I was looking for a quick solution for a JSF iterator, because i dont want to use the h:dataTable i have to write my own component, and here is what i came up with.
    public class JSFUIDataIterator extends UIData{
        public void encodeChildren(FacesContext oContext) throws IOException {
          if (oContext == null){
            throw new NullPointerException();
          int iProcessed = 0;
          int iRowIndex = getFirst() - 1;
          int iRows = getRows();
          Iterator oKids = getChildren(this);
          do{
            if(iRows > 0 && ++iProcessed > iRows)
              break;
            setRowIndex(++iRowIndex);
            if (!isRowAvailable())
              break;
            for(; oKids.hasNext();){
              UIComponent oKid = (UIComponent)oKids.next(); 
              encodeRecursive(oContext,oKid);
          } while(true);
        protected Iterator getChildren(UIComponent oComponent){
            List oResults = new ArrayList();
            for(Iterator oKids = oComponent.getChildren().iterator(); oKids.hasNext();){
              UIComponent oKid = (UIComponent)oKids.next();
              if(oKid.isRendered())
                 oResults.add(oKid);
            return oResults.iterator();
        private void encodeRecursive(FacesContext oContext,UIComponent oComponent) throws IOException{
           if (!oComponent.isRendered()){
             return; 
           oComponent.encodeBegin(oContext);
           if (oComponent.getRendersChildren()){
             oComponent.encodeChildren(oContext);
           else{
             Iterator oChildren = getChildren(oComponent);
             for(;oChildren.hasNext();){
               UIComponent oChildComponent = (UIComponent)oChildren.next();
               encodeRecursive(oContext,oChildComponent);
           oComponent.encodeEnd(oContext);
    }not want to be bothered by creating a renderer this component will render itself, but there is a problem, even though its iterating all the data elements its displaying the first data item. i missed something minor that i cant figure out. can anyone help?

    I haven't got a reply so i went to look at my code again, and i managed to identify the problem.
    I hope this code will help all those who want to use the iterator tag in JSF.
    this simple custom component will give you more control over your data elements
    here is the code for the custom component.
      public class DataIterator extends UIData{
        public void encodeChildren(FacesContext oContext) throws IOException {
          if (oContext == null){
            throw new NullPointerException();
          int iProcessed = 0;
          int iRowIndex = getFirst() - 1;
          int iRows = getRows();
          do{
            if(iRows > 0 && ++iProcessed > iRows)
              break;
            setRowIndex(++iRowIndex);
            if (!isRowAvailable())
              break;
            Iterator oKids = getChildren(this);
            for(; oKids.hasNext();){
              UIComponent oKid = (UIComponent)oKids.next(); 
              encodeRecursive(oContext,oKid);
          } while(true);
        protected Iterator getChildren(UIComponent oComponent){
            List oResults = new ArrayList();
            for(Iterator oKids = oComponent.getChildren().iterator(); oKids.hasNext();){
              UIComponent oKid = (UIComponent)oKids.next();
              if(oKid.isRendered())
                 oResults.add(oKid);
            return oResults.iterator();
        private void encodeRecursive(FacesContext oContext,UIComponent oComponent) throws IOException{
           if (!oComponent.isRendered()){
             return; 
           oComponent.encodeBegin(oContext);
           if (oComponent.getRendersChildren()){
             oComponent.encodeChildren(oContext);
           else{
             Iterator oChildren = getChildren(oComponent);
             for(;oChildren.hasNext();){
               UIComponent oChildComponent = (UIComponent)oChildren.next();
               encodeRecursive(oContext,oChildComponent);
           oComponent.encodeEnd(oContext);
      }you only need these three methods in your component, i have stripped out logging and comments to keep the size of this post smaller, the rest is pretty straight forward.
    you need a CustomTag class for the component and it should at least take two attributes : items and var.
    your tag library should look something like this:
        <name>forEach</name>
        <tag-class>myjsf.DataIteratorTag</tag-class>
        <body-content>JSP</body-content>
        <attribute>
          <name>items</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <type>java.lang.String</type>
        </attribute>
        <attribute>
          <name>var</name>
          <required>true</required>
          <rtexprvalue>false</rtexprvalue>
          <type>java.lang.String</type>
        </attribute>in the jsp page here is my sample file:
    <%@taglib uri="/WEB-INF/data-iterator.tld" prefix="tbc" %>
       <faces:view>
         <faces:verbatim>
           <table>
         </faces:verbatim>
         <tbc:forEach items="#{myCollection.musicTitles}" var="oRow">
          <faces:verbatim>
            <tr style="background-color:#EEEEEE;">
              <td>
          </faces:verbatim>
          <html:outputText value="#{oRow}"/>
         <faces:verbatim>
              </td>
            </tr>
         </faces:verbatim>
         </tbc:forEach>
         <faces:verbatim>
           </table>
         </faces:verbatim>

  • JSF - UICommand component not rendering properly

    2:12 PM 7/11/2007
    by Nirav Assar
    Overview
    It was discovered that in certain situations a UICommand component does not bind properly to its associated action method in the managed bean. The symptoms of this situation occur when you have a page with an action, and you click the action and nothing occurs. The page seems like it submits, but no code inside the action method of the managed bean gets executed and no errors are generated in the console!
    Problem
    The problem arises when you have a managed bean in request scope and you have a UICommand, either a commandLink or commandButton, associated to the bean. In addition this UICommand component has a rendered attribute tag (boolean value) that uses a managed bean method to tell it whether is renders or not. Even if the component gets rendered to the screen, the component does not get binded to the action method in the request scoped bean. This is a problem with JSF and may be due to the fact that the component gets rendered, but since the bean is not created until a request is submitted, the component never gets binded to an action. Therefore, nothing in the action method ever gets executed.
    Analysis
    Thus is seems like if you want to dynamically render a submit type component, such as a button or a link, you cannot effectivley do that with a bean in request scope. You'll have to place it session scope, which will work fine. Another option is to render the buttons all the time, but based on some scenario, using the "disabled" attribute to prevent a user from using the action. The "disable" attribute can access a boolean method in the managed bean.
    You could also use Javascript to hide the already rendered button on certain circumstance. However this would require javascript knowing the state of the domain objects/and or managed bean state.
    References:
    http://forum.java.sun.com/thread.jspa?threadID=5127437&messageID=9461810

    RamondDeCampo hit the nail on the head. If the bean used for the rendered attribute is request scope and the value differs between requests, you're going to see this type of behavior.
    Search the forums, there have been many similar reports as well as suggested solutions.

  • JSF + Tomahawk component NullPointerException

    Hi All,
    I made a sun JSF portlet by using the tomahawk 1.1.3 file upload component. The bean "UploadedFile myFile" is not getting set in the "MyBean.java" file. I get a java.lang.NullPointerException when I am trying to myFile.getName() or myFile.getInputStream().
    The inputFileUpload method should set the myFile Bean but it seems like its not getting set
    1
    2 <t:inputFileUpload id="myFileId"
    3            value="#{myBean.myFile}"
    4 storage="file"
    5 required="true"/>
    6 <h:message for="myFileId"/>
    I am attaching the whole code below
    Can somebody please help me. I have tried various versions of tomahawk and still not able to figure out the problem.
    I am using JSF 1.1.0 and tomahawk 1.1.3
    Please let me know if you need some more information from me
    1
      2======== index.jsp ==============
      3
      4<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      5<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      6<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
      7
      8<f:view>
      9
    10<h:form id="MyForm" enctype="multipart/form-data" >
    11
    12    <h:messages globalOnly="true" styleClass="message"/>
    13
    14    <h:panelGrid columns="3" border="0" cellspacing="5">
    15
    16        <h:outputLabel for="myFileId" value="File: "/>
    17        <t:inputFileUpload id="myFileId"
    18            value="#{myBean.myFile}"
    19            storage="file"
    20            required="true"/>
    21        <h:message for="myFileId"/>
    22
    23        <h:outputLabel for="myParamId" value="Param: "/>
    24        <h:selectOneMenu id="myParamId"
    25                value="#{myBean.myParam}"
    26                required="true">
    27            <f:selectItem itemLabel="" itemValue=""/>
    28            <f:selectItem itemLabel="MD5" itemValue="MD5"/>
    29            <f:selectItem itemLabel="SHA-1" itemValue="SHA-1"/>
    30            <f:selectItem itemLabel="SHA-256" itemValue="SHA-256"/>
    31            <f:selectItem itemLabel="SHA-384" itemValue="SHA-384"/>
    32            <f:selectItem itemLabel="SHA-512" itemValue="SHA-512"/>
    33        </h:selectOneMenu>
    34        <h:message for="myParamId"/>
    35
    36        <h:outputText value=" "/>
    37        <h:commandButton value="Submit"
    38            action="#{myBean.processMyFile}"/>
    39        <h:outputText value=" "/>
    40
    41    </h:panelGrid>
    42
    43</h:form>
    44
    45</f:view>
    46
    47
    48==========  MyBean.java ==============
    49
    50<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    51<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    52<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
    53
    54<f:view>
    55
    56<h:form id="MyForm" enctype="multipart/form-data" >
    57
    58    <h:messages globalOnly="true" styleClass="message"/>
    59
    60    <h:panelGrid columns="3" border="0" cellspacing="5">
    61
    62        <h:outputLabel for="myFileId" value="File: "/>
    63        <t:inputFileUpload id="myFileId"
    64            value="#{myBean.myFile}"
    65            storage="file"
    66            required="true"/>
    67        <h:message for="myFileId"/>
    68
    69        <h:outputLabel for="myParamId" value="Param: "/>
    70        <h:selectOneMenu id="myParamId"
    71                value="#{myBean.myParam}"
    72                required="true">
    73            <f:selectItem itemLabel="" itemValue=""/>
    74            <f:selectItem itemLabel="MD5" itemValue="MD5"/>
    75            <f:selectItem itemLabel="SHA-1" itemValue="SHA-1"/>
    76            <f:selectItem itemLabel="SHA-256" itemValue="SHA-256"/>
    77            <f:selectItem itemLabel="SHA-384" itemValue="SHA-384"/>
    78            <f:selectItem itemLabel="SHA-512" itemValue="SHA-512"/>
    79        </h:selectOneMenu>
    80        <h:message for="myParamId"/>
    81
    82        <h:outputText value=" "/>
    83        <h:commandButton value="Submit"
    84            action="#{myBean.processMyFile}"/>
    85        <h:outputText value=" "/>
    86
    87    </h:panelGrid>
    88
    89</h:form>
    90
    91</f:view>
    92
    93
    94=========== faces-config.xml ==========
    95
    96<?xml version="1.0"?>
    97<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    98
    99<faces-config xmlns="http://java.sun.com/JSF/Configuration">
    100    <managed-bean>
    101        <managed-bean-name>user</managed-bean-name>
    102        <managed-bean-class>com.sample.jsfsun.bean.UserBean</managed-bean-class>
    103        <managed-bean-scope>session</managed-bean-scope>
    104    </managed-bean>
    105    <managed-bean>
    106        <managed-bean-name>myBean</managed-bean-name>
    107        <managed-bean-class>com.sample.jsfsun.bean.MyBean</managed-bean-class>
    108        <managed-bean-scope>request</managed-bean-scope>
    109    </managed-bean>
    110    <navigation-rule>
    111        <from-view-id>/index.jsp</from-view-id>
    112        <navigation-case>
    113            <from-outcome>submit</from-outcome>
    114            <to-view-id>/welcome.jsp</to-view-id>
    115        </navigation-case>
    116    </navigation-rule>
    117    <navigation-rule>
    118        <from-view-id>/welcome.jsp</from-view-id>
    119        <navigation-case>
    120            <from-outcome>back</from-outcome>
    121            <to-view-id>/index.jsp</to-view-id>
    122        </navigation-case>
    123    </navigation-rule>
    124</faces-config>
    125
    126============= web.xml =============
    127
    128
    129<?xml version="1.0"?>
    130<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    131
    132<web-app>
    133    <display-name>friend_info_portlet</display-name>
    134    <context-param>
    135        <param-name>company_id</param-name>
    136        <param-value>liferay.com</param-value>
    137    </context-param>
    138    <context-param>
    139        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    140        <param-value>client</param-value>
    141    </context-param>
    142    <context-param>
    143        <param-name>javax.faces.application.CONFIG_FILES</param-name>
    144        <param-value>/WEB-INF/faces-config.xml</param-value>
    145    </context-param>
    146    <context-param>
    147        <param-name>com.sun.faces.validateXml</param-name>
    148        <param-value>false</param-value>
    149    </context-param>
    150    <filter>
    151        <filter-name>ExtensionsFilter</filter-name>
    152        <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
    153        <init-param>
    154            <param-name>uploadMaxFileSize</param-name>
    155            <param-value>10m</param-value>
    156        </init-param>
    157        <init-param>
    158            <param-name>uploadThresholdSize</param-name>
    159            <param-value>100k</param-value>
    160        </init-param>
    161    </filter>
    162    <filter-mapping>
    163        <filter-name>ExtensionsFilter</filter-name>
    164        <servlet-name>Faces Servlet</servlet-name>
    165    </filter-mapping>
    166    <filter-mapping>
    167        <filter-name>ExtensionsFilter</filter-name>
    168        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    169    </filter-mapping>
    170    <filter-mapping>
    171        <filter-name>ExtensionsFilter</filter-name>
    172        <url-pattern>*.jsf</url-pattern>
    173    </filter-mapping>
    174    <listener>
    175        <listener-class>com.liferay.portal.kernel.servlet.PortletContextListener</listener-class>
    176    </listener>
    177    <listener>
    178        <listener-class>com.liferay.util.jsf.sun.faces.config.LiferayConfigureListener</listener-class>
    179    </listener>
    180    <servlet>
    181        <servlet-name>friend_info_portlet</servlet-name>
    182        <servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
    183        <init-param>
    184            <param-name>portlet-class</param-name>
    185            <param-value>com.sun.faces.portlet.FacesPortlet</param-value>
    186        </init-param>
    187        <load-on-startup>0</load-on-startup>
    188    </servlet>
    189    <servlet>
    190        <servlet-name>Faces Servlet</servlet-name>
    191        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    192        <load-on-startup>1</load-on-startup>
    193    </servlet>
    194    <servlet-mapping>
    195        <servlet-name>friend_info_portlet</servlet-name>
    196        <url-pattern>/friend_info_portlet/*</url-pattern>
    197    </servlet-mapping>
    198    <servlet-mapping>
    199        <servlet-name>Faces Servlet</servlet-name>
    200        <url-pattern>/faces/*</url-pattern>
    201    </servlet-mapping>
    202    <servlet-mapping>
    203        <servlet-name>Faces Servlet</servlet-name>
    204        <url-pattern>*.faces</url-pattern>
    205    </servlet-mapping>
    206    <welcome-file-list>
    207        <welcome-file>index.jsp</welcome-file>
    208    </welcome-file-list>
    209    <taglib>
    210        <taglib-uri>http://java.sun.com/portlet</taglib-uri>
    211        <taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
    212    </taglib>
    213</web-app>

    jabalsad wrote:
    contents of /WEB-INF/lib
    jsf-api.jar
    jsf-impl.jar
    myfaces-api-1.2.7.jar
    myfaces-impl-1.2.7.jar
    You cannot mix differnet JSF implementations. Use the one or the other.
    As you stated that you're "using" Mojarra, get rid of those myfaces jars.

Maybe you are looking for

  • Black screen & all menu items grayed out -help!

    Sorry folks, total AE nube here, in over my head already. Having just purchased AE CS3 I'm completely adrift. I was in the process of looking at & changing preferences when shortly thereafter my screen went All black. A friend suggested it may have s

  • WPF PDF Viewer control

    Dears, I try to open PDF files in my WPF application using AxAcroPDF control .. it is working fine but i need to get the pages count and default zoom i opened the file with Any Ideas .. ?? Thanks in advance

  • I phone not activating?

    my i phone is saying , your i phone could not be activated because the activation server is temorarily unavailable? i have tried all day and got the same message, i have just had the phone unlocked so i can use my 02 sim card in it, as it was a previ

  • Re: Satellite C855-1W1 - need to change the touchpad settings

    I have a 6 weeks old Toshiba C855-1W1 laptop with WIN8. I am finding that the screen changes in the blink of an eye without my doing anything to make it do so. I cannot find anywhere in this new OS where I can make adjustments to the keypad. I need t

  • Mac OS X Lion unable to install after internet restore fails to verify

    I am in middle of the restore process. I have deleted the partition as adviced by apple support. But when on step to install Mac OS X Lion (using internet restore), it asks for apple ID for verification. On providing the correct credentials too it fa