FAQ
Does anyone happen to have a step-by-step procedure to get the component
examples loaded and working (preferably with source code included) under
WSAD 5.1.2 or RAD/RSA 6.0?

- Brendan

Search Discussions

  • Gvanmatre at Jun 8, 2005 at 11:25 pm
    One of the IBM redbooks covers this. It's a pretty good JSF reference in general. You have to create a custom eclipse plugin but it outlines the steps.

    WebSphere Studio 5.1.2 JavaServer Faces and Service Data Objects
    SG24-6361-00

    Chapter 14: Studio support for custom components

    Gary

    -------------- Original message --------------
    Does anyone happen to have a step-by-step procedure to get the component
    examples loaded and working (preferably with source code included) under
    WSAD 5.1.2 or RAD/RSA 6.0?

    - Brendan
  • CONNER, BRENDAN \(SBCSI\) at Jun 9, 2005 at 2:31 pm
    Thanks. Yes, this seems to be a good document on building custom
    components JSF using WSAD. I have built custom JSF components using
    WSAD, and that seems to work fine. However, I'm having trouble loading
    up the MyFaces components in particular into that environment, and was
    wondering whether anyone else has had luck doing this. I'm particularly
    interested in doing this with the Tree2 component, but, during the past
    3 days, I have not been able to get a successful deployment of this
    component up and running using WSAD. Just out of frustration, I finally
    just loaded the entire WAR file into my workspace, and, although I was
    able to bring up the tree2.jsp page, I got a JavaScript error saying
    something about object doesn't exist when I tried to expand the "server
    side" folder element.

    - Brendan

    -----Original Message-----
    From: gvanmatre@comcast.net
    Sent: Wednesday, June 08, 2005 6:26 PM
    To: MyFaces Discussion; myfaces-user@incubator.apache.org
    Cc: CONNER, BRENDAN (SBCSI)
    Subject: Re: Getting MyFaces Components to Work under WSAD or RAD


    One of the IBM redbooks covers this. It's a pretty good JSF reference
    in general. You have to create a custom eclipse plugin but it outlines
    the steps.

    WebSphere Studio 5.1.2 JavaServer Faces and Service Data Objects
    SG24-6361-00

    Chapter 14: Studio support for custom components

    Gary


    -------------- Original message --------------
    Does anyone happen to have a step-by-step procedure to get the component
    examples loaded and working (preferably with source code included) under
    WSAD 5.1.2 or RAD/RSA 6.0?

    - Brendan
  • Mike Burati at Jun 9, 2005 at 3:17 pm
    Brendan,
    I haven't tried what you're doing yet myself, but I'm curious, are you
    trying to add MyFaces components to the IBM supported JSF impl as part
    of a RAD6 created project which you selected the "Faces" option (which
    will prepopulate the project with IBM's Faces support), or are you just
    trying to use MyFaces in a plain old Java project in WSAD/RAD6 and
    having problems.

    **********************************
    Michael Burati
    Senior Software Engineer
    Bowstreet
    200 Ames Pond Drive
    Tewksbury, MA 01876
    T 978-863-1512
    F 978-863-1555
    www.bowstreet.com <http://www.bowstreet.com/>

    Get the latest <http://www.bowstreet.com/newsandevents/> information on
    Bowstreet's events and web seminars.



    ________________________________

    From: CONNER, BRENDAN (SBCSI)
    Sent: Thursday, June 09, 2005 10:31 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    Thanks. Yes, this seems to be a good document on building custom
    components JSF using WSAD. I have built custom JSF components using
    WSAD, and that seems to work fine. However, I'm having trouble loading
    up the MyFaces components in particular into that environment, and was
    wondering whether anyone else has had luck doing this. I'm particularly
    interested in doing this with the Tree2 component, but, during the past
    3 days, I have not been able to get a successful deployment of this
    component up and running using WSAD. Just out of frustration, I finally
    just loaded the entire WAR file into my workspace, and, although I was
    able to bring up the tree2.jsp page, I got a JavaScript error saying
    something about object doesn't exist when I tried to expand the "server
    side" folder element.

    - Brendan

    -----Original Message-----
    From: gvanmatre@comcast.net
    Sent: Wednesday, June 08, 2005 6:26 PM
    To: MyFaces Discussion; myfaces-user@incubator.apache.org
    Cc: CONNER, BRENDAN (SBCSI)
    Subject: Re: Getting MyFaces Components to Work under WSAD or
    RAD


    One of the IBM redbooks covers this. It's a pretty good JSF
    reference in general. You have to create a custom eclipse plugin but it
    outlines the steps.

    WebSphere Studio 5.1.2 JavaServer Faces and Service Data Objects
    SG24-6361-00

    Chapter 14: Studio support for custom components

    Gary


    -------------- Original message --------------
    Does anyone happen to have a step-by-step procedure to
    get the component
    examples loaded and working (preferably with source
    code included) under
    WSAD 5.1.2 or RAD/RSA 6.0? >
    - Brendan
  • CONNER, BRENDAN \(SBCSI\) at Jun 9, 2005 at 3:38 pm
    I'm trying to add MyFaces components to the IBM supported JSF impl as
    part of a RAD 6 created project in which I selected the Faces option.

    I suspect that the IBM supported JSF impl is insufficient to work with
    MyFaces components, because I believe it only follows the JSF 1.0
    standard, and I believe that MyFaces components require a later version
    of JSF. However, I did read the compatibility section of MyFaces, which
    said that the components have been tested on WAS 5.1.2, which is kind of
    confusing if my above assumptions are correct.

    If the IBM supported JSF impl *is* insufficient to work with MyFaces
    components, then I'd like to know the "next best" way to be able to load
    up the MyFaces components (actually just the Tree2 component for
    starters) into RAD 6 so they can be used and extended by a dynamic Web
    Project in RAD 6. Note that, even though we're using RAD 6, we are
    under a constraint that we be able to deploy our app to a WebSphere 5.1
    server.

    I'm supposed to give my recommendations to my company by end of week
    about whether to build our own tree component or use (and possibly
    extend) one of the ones in the marketplace for our internal
    applications. My first instinct was to go with Apache, but, after 3
    days of banging my head trying to get even the example tree2.jsp working
    under RAD 6, I'm not helping my case any. ;-)

    Any hints or steps would be appreciated about whether/how I can get
    MyFaces components (at least Tree2, anyway) working in a RAD 6 (or WSAD)
    environment, so we're able to run at least the tree2.jsp example in our
    test environment and on our target WebSphere 5.1 or 6.0 server. Using
    the IBM supplied JSF impl would be preferred, but we might be open to
    other alternatives if they will work.

    Thanks!

    - Brendan

    -----Original Message-----
    From: Mike Burati
    Sent: Thursday, June 09, 2005 10:07 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    Brendan,
    I haven't tried what you're doing yet myself, but I'm curious, are you
    trying to add MyFaces components to the IBM supported JSF impl as part
    of a RAD6 created project which you selected the "Faces" option (which
    will prepopulate the project with IBM's Faces support), or are you just
    trying to use MyFaces in a plain old Java project in WSAD/RAD6 and
    having problems.

    **********************************
    Michael Burati
    Senior Software Engineer
    Bowstreet
    200 Ames Pond Drive
    Tewksbury, MA 01876
    T 978-863-1512
    F 978-863-1555
    www.bowstreet.com <http://www.bowstreet.com/>

    <http://www.bowstreet.com/newsandevents/> Get the latest information on
    Bowstreet's events and web seminars.



    _____

    From: CONNER, BRENDAN (SBCSI)
    Sent: Thursday, June 09, 2005 10:31 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    Thanks. Yes, this seems to be a good document on building custom
    components JSF using WSAD. I have built custom JSF components using
    WSAD, and that seems to work fine. However, I'm having trouble loading
    up the MyFaces components in particular into that environment, and was
    wondering whether anyone else has had luck doing this. I'm particularly
    interested in doing this with the Tree2 component, but, during the past
    3 days, I have not been able to get a successful deployment of this
    component up and running using WSAD. Just out of frustration, I finally
    just loaded the entire WAR file into my workspace, and, although I was
    able to bring up the tree2.jsp page, I got a JavaScript error saying
    something about object doesn't exist when I tried to expand the "server
    side" folder element.

    - Brendan

    -----Original Message-----
    From: gvanmatre@comcast.net
    Sent: Wednesday, June 08, 2005 6:26 PM
    To: MyFaces Discussion; myfaces-user@incubator.apache.org
    Cc: CONNER, BRENDAN (SBCSI)
    Subject: Re: Getting MyFaces Components to Work under WSAD or RAD


    One of the IBM redbooks covers this. It's a pretty good JSF reference
    in general. You have to create a custom eclipse plugin but it outlines
    the steps.

    WebSphere Studio 5.1.2 JavaServer Faces and Service Data Objects
    SG24-6361-00

    Chapter 14: Studio support for custom components

    Gary


    -------------- Original message --------------
    Does anyone happen to have a step-by-step procedure to get the component
    examples loaded and working (preferably with source code included) under
    WSAD 5.1.2 or RAD/RSA 6.0?

    - Brendan
  • Mike Burati at Jun 9, 2005 at 3:58 pm
    Thanks, that's kind of what I expected (trying to use MyFaces custom
    components on IBM's JSF Impl).

    I agree that it appears that the JSF jars supplied with the RAD6 Faces
    support appear to be 1.0 based, not 1.0.1,
    so that may indeed be the cause of the problem you're seeing (eg, if
    there was a bug in 1.0 that's been fixed in 1.1
    that the tree2 component relies on)... I haven't seen whether there's
    a newer version of Faces support coming out
    for RAD6 or not, but then again I haven't actually looked either...
    However, I did read the compatibility section of MyFaces, which said
    that the components have been tested on WAS 5.1.2, which is kind of
    confusing if my above assumptions are correct.

    Is it possible they (the components) were tested on the MyFaces JSF impl
    on WAS5.1.2, as opposed to the IBM JSF impl on WAS5.1.2?

    You may want to try IBM's RAD Developer forum at the following URL (it
    looks like your question has already been asked there):

    http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=430&thr
    ead=83163&message=13722909&cat=24&q=JSF#13722909


    ________________________________

    From: CONNER, BRENDAN (SBCSI)
    Sent: Thursday, June 09, 2005 11:38 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    I'm trying to add MyFaces components to the IBM supported JSF impl as
    part of a RAD 6 created project in which I selected the Faces option.

    I suspect that the IBM supported JSF impl is insufficient to work with
    MyFaces components, because I believe it only follows the JSF 1.0
    standard, and I believe that MyFaces components require a later version
    of JSF. However, I did read the compatibility section of MyFaces, which
    said that the components have been tested on WAS 5.1.2, which is kind of
    confusing if my above assumptions are correct.

    If the IBM supported JSF impl *is* insufficient to work with MyFaces
    components, then I'd like to know the "next best" way to be able to load
    up the MyFaces components (actually just the Tree2 component for
    starters) into RAD 6 so they can be used and extended by a dynamic Web
    Project in RAD 6. Note that, even though we're using RAD 6, we are
    under a constraint that we be able to deploy our app to a WebSphere 5.1
    server.

    I'm supposed to give my recommendations to my company by end of week
    about whether to build our own tree component or use (and possibly
    extend) one of the ones in the marketplace for our internal
    applications. My first instinct was to go with Apache, but, after 3
    days of banging my head trying to get even the example tree2.jsp working
    under RAD 6, I'm not helping my case any. ;-)

    Any hints or steps would be appreciated about whether/how I can get
    MyFaces components (at least Tree2, anyway) working in a RAD 6 (or WSAD)
    environment, so we're able to run at least the tree2.jsp example in our
    test environment and on our target WebSphere 5.1 or 6.0 server. Using
    the IBM supplied JSF impl would be preferred, but we might be open to
    other alternatives if they will work.

    Thanks!

    - Brendan

    -----Original Message-----
    From: Mike Burati
    Sent: Thursday, June 09, 2005 10:07 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or
    RAD


    Brendan,
    I haven't tried what you're doing yet myself, but I'm curious,
    are you trying to add MyFaces components to the IBM supported JSF impl
    as part of a RAD6 created project which you selected the "Faces" option
    (which will prepopulate the project with IBM's Faces support), or are
    you just trying to use MyFaces in a plain old Java project in WSAD/RAD6
    and having problems.

    **********************************
    Michael Burati
    Senior Software Engineer
    Bowstreet
    200 Ames Pond Drive
    Tewksbury, MA 01876
    T 978-863-1512
    F 978-863-1555
    www.bowstreet.com <http://www.bowstreet.com/>

    Get the latest <http://www.bowstreet.com/newsandevents/>
    information on Bowstreet's events and web seminars.



    ________________________________

    From: CONNER, BRENDAN (SBCSI)
    Sent: Thursday, June 09, 2005 10:31 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or
    RAD


    Thanks. Yes, this seems to be a good document on building
    custom components JSF using WSAD. I have built custom JSF components
    using WSAD, and that seems to work fine. However, I'm having trouble
    loading up the MyFaces components in particular into that environment,
    and was wondering whether anyone else has had luck doing this. I'm
    particularly interested in doing this with the Tree2 component, but,
    during the past 3 days, I have not been able to get a successful
    deployment of this component up and running using WSAD. Just out of
    frustration, I finally just loaded the entire WAR file into my
    workspace, and, although I was able to bring up the tree2.jsp page, I
    got a JavaScript error saying something about object doesn't exist when
    I tried to expand the "server side" folder element.

    - Brendan

    -----Original Message-----
    From: gvanmatre@comcast.net

    Sent: Wednesday, June 08, 2005 6:26 PM
    To: MyFaces Discussion;
    myfaces-user@incubator.apache.org
    Cc: CONNER, BRENDAN (SBCSI)
    Subject: Re: Getting MyFaces Components to Work under
    WSAD or RAD


    One of the IBM redbooks covers this. It's a pretty good
    JSF reference in general. You have to create a custom eclipse plugin
    but it outlines the steps.

    WebSphere Studio 5.1.2 JavaServer Faces and Service Data
    Objects
    SG24-6361-00

    Chapter 14: Studio support for custom components

    Gary


    -------------- Original message --------------
    Does anyone happen to have a step-by-step
    procedure to get the component
    examples loaded and working (preferably with
    source code included) under
    WSAD 5.1.2 or RAD/RSA 6.0? >
    - Brendan
  • Cote Mark at Jun 9, 2005 at 4:28 pm
    We too also use RAD 6.0 and must deploy to a WebSphere 5.1 server. The first
    thing we did was nix the IBM implementation of JSF. We only use the MyFaces
    implementation and have had no problems whatsoever developping in WSAD
    512/RAD 6.0 and deploying to WAS 5.x.

    Why we nixed the IBM impl:

    1) Our JSPs are much too complex to use the RAD graphical editor anyway.
    2) MyFaces appears to be a very healthy project, which is very much in tune
    with developpers needs.
    3) The Open source model (for this type of framework) is more trustworthy
    than a vendor's impl (just my opinion).
    4) Our app may be ported, in the future, into the SAP WEBAS J2EE server and
    we did not want any IBM impl dependency
    headaches.
    5) There is much more immediate support with MyFaces via the forum, much
    more activity than at IBM.
    6) Apache runs a tight ship, we have always had success with projects
    managed under apache.


    Just some thoughts we had on this issue,


    Mark


    _____

    De : Mike Burati
    Envoyé : jeudi 9 juin 2005 11:58
    À : MyFaces Discussion
    Objet : RE: Getting MyFaces Components to Work under WSAD or RAD



    Thanks, that's kind of what I expected (trying to use MyFaces custom
    components on IBM's JSF Impl).

    I agree that it appears that the JSF jars supplied with the RAD6 Faces
    support appear to be 1.0 based, not 1.0.1,
    so that may indeed be the cause of the problem you're seeing (eg, if there
    was a bug in 1.0 that's been fixed in 1.1
    that the tree2 component relies on)... I haven't seen whether there's a
    newer version of Faces support coming out
    for RAD6 or not, but then again I haven't actually looked either...
    However, I did read the compatibility section of MyFaces, which said that
    the components have been tested on WAS 5.1.2, which is kind of confusing if
    my above assumptions are correct.

    Is it possible they (the components) were tested on the MyFaces JSF impl on
    WAS5.1.2, as opposed to the IBM JSF impl on WAS5.1.2?

    You may want to try IBM's RAD Developer forum at the following URL (it looks
    like your question has already been asked there):

    http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=430
    <http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=430&thread
    =83163&message=13722909&cat=24&q=JSF#13722909>
    &thread=83163&message=13722909&cat=24&q=JSF#13722909


    _____

    From: CONNER, BRENDAN (SBCSI)
    Sent: Thursday, June 09, 2005 11:38 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    I'm trying to add MyFaces components to the IBM supported JSF impl as part
    of a RAD 6 created project in which I selected the Faces option.

    I suspect that the IBM supported JSF impl is insufficient to work with
    MyFaces components, because I believe it only follows the JSF 1.0 standard,
    and I believe that MyFaces components require a later version of JSF.
    However, I did read the compatibility section of MyFaces, which said that
    the components have been tested on WAS 5.1.2, which is kind of confusing if
    my above assumptions are correct.

    If the IBM supported JSF impl *is* insufficient to work with MyFaces
    components, then I'd like to know the "next best" way to be able to load up
    the MyFaces components (actually just the Tree2 component for starters) into
    RAD 6 so they can be used and extended by a dynamic Web Project in RAD 6.
    Note that, even though we're using RAD 6, we are under a constraint that we
    be able to deploy our app to a WebSphere 5.1 server.

    I'm supposed to give my recommendations to my company by end of week about
    whether to build our own tree component or use (and possibly extend) one of
    the ones in the marketplace for our internal applications. My first
    instinct was to go with Apache, but, after 3 days of banging my head trying
    to get even the example tree2.jsp working under RAD 6, I'm not helping my
    case any. ;-)

    Any hints or steps would be appreciated about whether/how I can get MyFaces
    components (at least Tree2, anyway) working in a RAD 6 (or WSAD)
    environment, so we're able to run at least the tree2.jsp example in our test
    environment and on our target WebSphere 5.1 or 6.0 server. Using the IBM
    supplied JSF impl would be preferred, but we might be open to other
    alternatives if they will work.

    Thanks!

    - Brendan

    -----Original Message-----
    From: Mike Burati
    Sent: Thursday, June 09, 2005 10:07 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    Brendan,
    I haven't tried what you're doing yet myself, but I'm curious, are you
    trying to add MyFaces components to the IBM supported JSF impl as part of a
    RAD6 created project which you selected the "Faces" option (which will
    prepopulate the project with IBM's Faces support), or are you just trying to
    use MyFaces in a plain old Java project in WSAD/RAD6 and having problems.

    **********************************
    Michael Burati
    Senior Software Engineer
    Bowstreet
    200 Ames Pond Drive
    Tewksbury, MA 01876
    T 978-863-1512
    F 978-863-1555
    www.bowstreet.com <http://www.bowstreet.com/>

    <http://www.bowstreet.com/newsandevents/> Get the latest information on
    Bowstreet's events and web seminars.



    _____

    From: CONNER, BRENDAN (SBCSI)
    Sent: Thursday, June 09, 2005 10:31 AM
    To: MyFaces Discussion
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    Thanks. Yes, this seems to be a good document on building custom components
    JSF using WSAD. I have built custom JSF components using WSAD, and that
    seems to work fine. However, I'm having trouble loading up the MyFaces
    components in particular into that environment, and was wondering whether
    anyone else has had luck doing this. I'm particularly interested in doing
    this with the Tree2 component, but, during the past 3 days, I have not been
    able to get a successful deployment of this component up and running using
    WSAD. Just out of frustration, I finally just loaded the entire WAR file
    into my workspace, and, although I was able to bring up the tree2.jsp page,
    I got a JavaScript error saying something about object doesn't exist when I
    tried to expand the "server side" folder element.

    - Brendan

    -----Original Message-----
    From: gvanmatre@comcast.net
    Sent: Wednesday, June 08, 2005 6:26 PM
    To: MyFaces Discussion; myfaces-user@incubator.apache.org
    Cc: CONNER, BRENDAN (SBCSI)
    Subject: Re: Getting MyFaces Components to Work under WSAD or RAD


    One of the IBM redbooks covers this. It's a pretty good JSF reference in
    general. You have to create a custom eclipse plugin but it outlines the
    steps.

    WebSphere Studio 5.1.2 JavaServer Faces and Service Data Objects
    SG24-6361-00

    Chapter 14: Studio support for custom components

    Gary


    -------------- Original message --------------
    Does anyone happen to have a step-by-step procedure to get the component
    examples loaded and working (preferably with source code included) under
    WSAD 5.1.2 or RAD/RSA 6.0?

    - Brendan
  • CONNER, BRENDAN \(SBCSI\) at Jun 9, 2005 at 7:06 pm
    Thanks Mark,

    Can you by any chance give a step by step list of things you did to get
    this to work (e.g., which JAR files you copied over, etc.)?

    I did a few experiments:

    1. Using the existing IBM implementation:

    I started out using the regular IBM implementation, just copying over
    the source for the Tree2 classes and any classes upon which they
    depended. Doing this, I actually got the server up and running.

    The problem was that, when I tried to bring up tree2.jsp, I got a 500:
    Assertion Failed message when the HtmlTreeRenderer was in its
    encodeResursive method:



    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init parameter
    'org.apache.myfaces.PRETTY_HTML' found, using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init parameter
    'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init parameter
    'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init parameter
    'org.apache.myfaces.AUTO_SCROLL' found, using default value false
    [6/9/05 13:48:27:726 CDT] 51a6029e WebGroup E SRVE0026E: [Servlet
    Error]-[Assertion Failed]: javax.faces.FacesException: Assertion Failed
    at com.sun.faces.util.Util.doAssert(Util.java:1300)
    at
    com.sun.faces.renderkit.html_basic.CommandLinkRenderer.encodeBegin(Comma
    ndLinkRenderer.java:186)
    at
    javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:6
    89)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeRecursive(HtmlTre
    eRenderer.java:557)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeNavigation(HtmlTr
    eeRenderer.java:545)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeCurrentNode(HtmlT
    reeRenderer.java:328)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeTree(HtmlTreeRend
    erer.java:230)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeChildren(HtmlTree
    Renderer.java:182)
    at
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.jav
    a:707)
    at
    javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:588
    )
    at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:525)
    at org.apache.jsp._tree2._jspService(_tree2.java:858)
    at
    com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java
    :89)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service
    (JspServlet.java:344)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet
    .java:683)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:7
    81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
    rvletInstance.java:110)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
    fecycleServlet.java:174)
    at
    com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
    Servlet.java:313)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
    ecycleServlet.java:116)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
    java:283)
    at
    com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
    dServletReferenceState.java:42)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
    tInstanceReference.java:40)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
    tch(WebAppRequestDispatcher.java:1019)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
    questDispatcher.java:592)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
    uestDispatcher.java:204)
    at
    com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExt
    ernalContextImpl.java:320)
    at
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.jav
    a:295)
    at
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.
    java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at
    com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
    rvletInstance.java:110)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
    fecycleServlet.java:174)
    at
    com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
    Servlet.java:313)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
    ecycleServlet.java:116)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
    java:283)
    at
    com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
    dServletReferenceState.java:42)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
    tInstanceReference.java:40)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
    tch(WebAppRequestDispatcher.java:1019)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
    questDispatcher.java:592)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
    uestDispatcher.java:204)
    at
    com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
    25)
    at
    com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
    oker.java:286)
    at
    com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
    on(CachedInvocation.java:71)
    at
    com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
    tRequestProcessor.java:182)
    at
    com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
    tener.java:334)
    at
    com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
    .java:56)
    at
    com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
    615)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

    2. Using the MyFaces implementation

    Then I created a brand new workspace and followed the Getting Started
    directions at http://www.myfaces.org, copying the following JAR files to
    my Web project's lib folder:

    myfaces-jsf-api.jar
    myfaces.jar
    jstl.jar
    jakarta-oro.jar
    commons-codec-1.2.jar
    commons-el.jar
    commons-fileupload-1.0.jar
    commons-logging.jar
    commons-validator.jar

    And I copied the contents from my downloaded myfaces-1.0.9\conf\web.xml
    to my web.xml file. However, after doing this, the server wouldn't even
    start up my Web project:

    [6/9/05 13:32:56:186 CDT] 312c4008 ApplicationMg A WSVR0200I: Starting
    application: Test4
    [6/9/05 13:32:56:264 CDT] 312c4008 WebContainer A SRVE0169I: Loading
    Web Module: Test4Web.
    [6/9/05 13:32:56:717 CDT] 312c4008 WebApp E SRVE0015E: Failure to
    initialize Web application Test4Web
    [6/9/05 13:32:56:748 CDT] 312c4008 WebGroup E SRVE0054E: An error
    occurred while loading Web application
    [6/9/05 13:32:56:764 CDT] 312c4008 DeployedAppli W WSVR0206E: Module,
    Test4Web.war, of application, Test4.ear/deployments/Test4, failed to
    start
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg W WSVR0101W: An error
    occurred starting, Test4
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg A WSVR0217I: Stopping
    application: Test4
    [6/9/05 13:32:56:826 CDT] 312c4008 ApplicationMg A WSVR0220I:
    Application stopped: Test4
    [6/9/05 13:32:56:842 CDT] 312c4008 HttpTransport A SRVE0171I: Transport
    http is listening on port 8,080.
    [6/9/05 13:32:58:873 CDT] 312c4008 HttpTransport A SRVE0171I: Transport
    https is listening on port 9,443.
    [6/9/05 13:32:58:889 CDT] 312c4008 RMIConnectorC A ADMC0026I: RMI
    Connector available at port 2809
    [6/9/05 13:32:58:920 CDT] 312c4008 WsServer A WSVR0001I: Server
    server1 open for e-business


    3. Importing the entire WAR file

    I also tried importing the entire WAR file provided by one of the
    MyFaces JAR files. At least with that, I was able to bring up the
    tree2.jsp page, but when I clicked on the plus sign to expand the server
    side folder, my browser registered a JavaScript error indicating that a
    referenced object was undefined.

    - Brendan
  • Cote Mark at Jun 9, 2005 at 8:11 pm
    Brendan,

    We first built our projects over a year ago, so I don't quite remember
    the steps we took. However,
    my suggestion would be as follows:

    1) Create a new (and empty) dynamic web project with the wizard.
    2) At the 'Features' dialog, uncheck all the default ones ... you should add
    NO features, especially not the IBM JSF impl.
    3) Add only the MyFaces JSF impl jars in the 'lib' directory, etc... like
    the myfaces documentation says.
    4) Create a hello world jsp, using jsf's framework. Make sure it works.
    5) Methodically add you application components one at a time, testing them
    as you go. I noticed you tried getting your whole
    app to work at once with the myfaces impl. You might get lucky, and it
    could ... but slow and steady will always finish the
    race.


    HTH,



    Mark



    _____

    De : CONNER, BRENDAN (SBCSI)
    Envoyé : jeudi 9 juin 2005 15:06
    À : MyFaces Discussion
    Objet : RE: Getting MyFaces Components to Work under WSAD or RAD



    Thanks Mark,

    Can you by any chance give a step by step list of things you did to get this
    to work (e.g., which JAR files you copied over, etc.)?

    I did a few experiments:

    1. Using the existing IBM implementation:

    I started out using the regular IBM implementation, just copying over the
    source for the Tree2 classes and any classes upon which they depended.
    Doing this, I actually got the server up and running.

    The problem was that, when I tried to bring up tree2.jsp, I got a 500:
    Assertion Failed message when the HtmlTreeRenderer was in its
    encodeResursive method:



    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init parameter
    'org.apache.myfaces.PRETTY_HTML' found, using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init parameter
    'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init parameter
    'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init parameter
    'org.apache.myfaces.AUTO_SCROLL' found, using default value false
    [6/9/05 13:48:27:726 CDT] 51a6029e WebGroup E SRVE0026E: [Servlet
    Error]-[Assertion Failed]: javax.faces.FacesException: Assertion Failed
    at com.sun.faces.util.Util.doAssert(Util.java:1300)
    at
    com.sun.faces.renderkit.html_basic.CommandLinkRenderer.encodeBegin(CommandLi
    nkRenderer.java:186)
    at
    javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:689)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeRecursive(HtmlTreeRen
    derer.java:557)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeNavigation(HtmlTreeRe
    nderer.java:545)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeCurrentNode(HtmlTreeR
    enderer.java:328)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeTree(HtmlTreeRenderer
    .java:230)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeChildren(HtmlTreeRend
    erer.java:182)
    at
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:70
    7)
    at
    javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:588)
    at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:525)
    at org.apache.jsp._tree2._jspService(_tree2.java:858)
    at
    com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(Jsp
    Servlet.java:344)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.jav
    a:683)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
    tInstance.java:110)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
    cleServlet.java:174)
    at
    com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
    let.java:313)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
    leServlet.java:116)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
    :283)
    at
    com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidSer
    vletReferenceState.java:42)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletIns
    tanceReference.java:40)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
    WebAppRequestDispatcher.java:1019)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
    tDispatcher.java:592)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
    Dispatcher.java:204)
    at
    com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExterna
    lContextImpl.java:320)
    at
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:29
    5)
    at
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java
    :87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at
    com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
    tInstance.java:110)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
    cleServlet.java:174)
    at
    com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
    let.java:313)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
    leServlet.java:116)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
    :283)
    at
    com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidSer
    vletReferenceState.java:42)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletIns
    tanceReference.java:40)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
    WebAppRequestDispatcher.java:1019)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
    tDispatcher.java:592)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
    Dispatcher.java:204)
    at
    com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
    at
    com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
    .java:286)
    at
    com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C
    achedInvocation.java:71)
    at
    com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq
    uestProcessor.java:182)
    at
    com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene
    r.java:334)
    at
    com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav
    a:56)
    at
    com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

    2. Using the MyFaces implementation

    Then I created a brand new workspace and followed the Getting Started
    directions at http://www.myfaces.org <http://www.myfaces.org> , copying the
    following JAR files to my Web project's lib folder:

    myfaces-jsf-api.jar
    myfaces.jar
    jstl.jar
    jakarta-oro.jar
    commons-codec-1.2.jar
    commons-el.jar
    commons-fileupload-1.0.jar
    commons-logging.jar
    commons-validator.jar

    And I copied the contents from my downloaded myfaces-1.0.9\conf\web.xml to
    my web.xml file. However, after doing this, the server wouldn't even start
    up my Web project:

    [6/9/05 13:32:56:186 CDT] 312c4008 ApplicationMg A WSVR0200I: Starting
    application: Test4
    [6/9/05 13:32:56:264 CDT] 312c4008 WebContainer A SRVE0169I: Loading Web
    Module: Test4Web.
    [6/9/05 13:32:56:717 CDT] 312c4008 WebApp E SRVE0015E: Failure to
    initialize Web application Test4Web
    [6/9/05 13:32:56:748 CDT] 312c4008 WebGroup E SRVE0054E: An error
    occurred while loading Web application
    [6/9/05 13:32:56:764 CDT] 312c4008 DeployedAppli W WSVR0206E: Module,
    Test4Web.war, of application, Test4.ear/deployments/Test4, failed to start
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg W WSVR0101W: An error
    occurred starting, Test4
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg A WSVR0217I: Stopping
    application: Test4
    [6/9/05 13:32:56:826 CDT] 312c4008 ApplicationMg A WSVR0220I: Application
    stopped: Test4
    [6/9/05 13:32:56:842 CDT] 312c4008 HttpTransport A SRVE0171I: Transport http
    is listening on port 8,080.
    [6/9/05 13:32:58:873 CDT] 312c4008 HttpTransport A SRVE0171I: Transport
    https is listening on port 9,443.
    [6/9/05 13:32:58:889 CDT] 312c4008 RMIConnectorC A ADMC0026I: RMI Connector
    available at port 2809
    [6/9/05 13:32:58:920 CDT] 312c4008 WsServer A WSVR0001I: Server server1
    open for e-business


    3. Importing the entire WAR file

    I also tried importing the entire WAR file provided by one of the MyFaces
    JAR files. At least with that, I was able to bring up the tree2.jsp page,
    but when I clicked on the plus sign to expand the server side folder, my
    browser registered a JavaScript error indicating that a referenced object
    was undefined.

    - Brendan
  • CONNER, BRENDAN \(SBCSI\) at Jun 9, 2005 at 8:25 pm
    Thanks. I thought I already *was* going slow and steady, since I'm just trying to get a single tree component and single jsp to work. ;-) And my helloWorld.jsp did work on my trial 1 and trial 3 (listed in my previous post). Obviously, my helloWorld.jsp didn't work in trial 2 (in which I had tried to follow methodically the instructions on the MyFaces Web site), because my server wouldn't even start up.

    I'll continue playing around with it...

    Thanks again,

    - Brendan

    -----Original Message-----
    From: Cote.Mark@hydro.qc.ca
    Sent: Thursday, June 09, 2005 3:11 PM
    To: users@myfaces.apache.org
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    Brendan,

    We first built our projects over a year ago, so I don't quite remember the steps we took. However,
    my suggestion would be as follows:

    1) Create a new (and empty) dynamic web project with the wizard.
    2) At the 'Features' dialog, uncheck all the default ones ... you should add NO features, especially not the IBM JSF impl.
    3) Add only the MyFaces JSF impl jars in the 'lib' directory, etc... like the myfaces documentation says.
    4) Create a hello world jsp, using jsf's framework. Make sure it works.
    5) Methodically add you application components one at a time, testing them as you go. I noticed you tried getting your whole
    app to work at once with the myfaces impl. You might get lucky, and it could ... but slow and steady will always finish the
    race.


    HTH,



    Mark



    _____

    De : CONNER, BRENDAN (SBCSI)
    Envoyé : jeudi 9 juin 2005 15:06
    À : MyFaces Discussion
    Objet : RE: Getting MyFaces Components to Work under WSAD or RAD



    Thanks Mark,

    Can you by any chance give a step by step list of things you did to get this to work (e.g., which JAR files you copied over, etc.)?

    I did a few experiments:

    1. Using the existing IBM implementation:

    I started out using the regular IBM implementation, just copying over the source for the Tree2 classes and any classes upon which they depended. Doing this, I actually got the server up and running.

    The problem was that, when I tried to bring up tree2.jsp, I got a 500: Assertion Failed message when the HtmlTreeRenderer was in its encodeResursive method:



    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I org.apache.myfaces.config.MyfacesConfig No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I org.apache.myfaces.config.MyfacesConfig No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I org.apache.myfaces.config.MyfacesConfig No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I org.apache.myfaces.config.MyfacesConfig No context init parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false
    [6/9/05 13:48:27:726 CDT] 51a6029e WebGroup E SRVE0026E: [Servlet Error]-[Assertion Failed]: javax.faces.FacesException: Assertion Failed
    at com.sun.faces.util.Util.doAssert(Util.java:1300)
    at com.sun.faces.renderkit.html_basic.CommandLinkRenderer.encodeBegin(CommandLinkRenderer.java:186)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:689)
    at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeRecursive(HtmlTreeRenderer.java:557)
    at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeNavigation(HtmlTreeRenderer.java:545)
    at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeCurrentNode(HtmlTreeRenderer.java:328)
    at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeTree(HtmlTreeRenderer.java:230)
    at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeChildren(HtmlTreeRenderer.java:182)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:707)
    at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:588)
    at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:525)
    at org.apache.jsp._tree2._jspService(_tree2.java:858)
    at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
    at com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:320)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

    2. Using the MyFaces implementation

    Then I created a brand new workspace and followed the Getting Started directions at http://www.myfaces.org, copying the following JAR files to my Web project's lib folder:

    myfaces-jsf-api.jar
    myfaces.jar
    jstl.jar
    jakarta-oro.jar
    commons-codec-1.2.jar
    commons-el.jar
    commons-fileupload-1.0.jar
    commons-logging.jar
    commons-validator.jar

    And I copied the contents from my downloaded myfaces-1.0.9\conf\web.xml to my web.xml file. However, after doing this, the server wouldn't even start up my Web project:

    [6/9/05 13:32:56:186 CDT] 312c4008 ApplicationMg A WSVR0200I: Starting application: Test4
    [6/9/05 13:32:56:264 CDT] 312c4008 WebContainer A SRVE0169I: Loading Web Module: Test4Web.
    [6/9/05 13:32:56:717 CDT] 312c4008 WebApp E SRVE0015E: Failure to initialize Web application Test4Web
    [6/9/05 13:32:56:748 CDT] 312c4008 WebGroup E SRVE0054E: An error occurred while loading Web application
    [6/9/05 13:32:56:764 CDT] 312c4008 DeployedAppli W WSVR0206E: Module, Test4Web.war, of application, Test4.ear/deployments/Test4, failed to start
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg W WSVR0101W: An error occurred starting, Test4
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg A WSVR0217I: Stopping application: Test4
    [6/9/05 13:32:56:826 CDT] 312c4008 ApplicationMg A WSVR0220I: Application stopped: Test4
    [6/9/05 13:32:56:842 CDT] 312c4008 HttpTransport A SRVE0171I: Transport http is listening on port 8,080.
    [6/9/05 13:32:58:873 CDT] 312c4008 HttpTransport A SRVE0171I: Transport https is listening on port 9,443.
    [6/9/05 13:32:58:889 CDT] 312c4008 RMIConnectorC A ADMC0026I: RMI Connector available at port 2809
    [6/9/05 13:32:58:920 CDT] 312c4008 WsServer A WSVR0001I: Server server1 open for e-business


    3. Importing the entire WAR file

    I also tried importing the entire WAR file provided by one of the MyFaces JAR files. At least with that, I was able to bring up the tree2.jsp page, but when I clicked on the plus sign to expand the server side folder, my browser registered a JavaScript error indicating that a referenced object was undefined.

    - Brendan
  • Bruno Aranda at Jun 10, 2005 at 3:35 pm
    This information can be very useful for users with similar problems.
    Please, feel free to update the myfaces wiki at
    http://wiki.apache.org/myfaces :-)

    Regards,

    Bruno

    2005/6/9, CONNER, BRENDAN (SBCSI) <bc1378@sbc.com>:
    Thanks. I thought I already *was* going slow and steady, since I'm just
    trying to get a single tree component and single jsp to work. ;-) And my
    helloWorld.jsp did work on my trial 1 and trial 3 (listed in my previous
    post). Obviously, my helloWorld.jsp didn't work in trial 2 (in which I had
    tried to follow methodically the instructions on the MyFaces Web site),
    because my server wouldn't even start up.

    I'll continue playing around with it...

    Thanks again,

    - Brendan



    -----Original Message-----
    From: Cote.Mark@hydro.qc.ca
    Sent: Thursday, June 09, 2005 3:11 PM
    To: users@myfaces.apache.org
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    Brendan,

    We first built our projects over a year ago, so I don't quite remember
    the steps we took. However,
    my suggestion would be as follows:

    1) Create a new (and empty) dynamic web project with the wizard.
    2) At the 'Features' dialog, uncheck all the default ones ... you should add
    NO features, especially not the IBM JSF impl.
    3) Add only the MyFaces JSF impl jars in the 'lib' directory, etc... like
    the myfaces documentation says.
    4) Create a hello world jsp, using jsf's framework. Make sure it works.
    5) Methodically add you application components one at a time, testing them
    as you go. I noticed you tried getting your whole
    app to work at once with the myfaces impl. You might get lucky, and it
    could ... but slow and steady will always finish the
    race.


    HTH,



    Mark



    ________________________________

    De : CONNER, BRENDAN (SBCSI)
    Envoyé : jeudi 9 juin 2005 15:06
    À : MyFaces Discussion
    Objet : RE: Getting MyFaces Components to Work under WSAD or RAD




    Thanks Mark,

    Can you by any chance give a step by step list of things you did to get this
    to work (e.g., which JAR files you copied over, etc.)?

    I did a few experiments:

    1. Using the existing IBM implementation:

    I started out using the regular IBM implementation, just copying over the
    source for the Tree2 classes and any classes upon which they depended.
    Doing this, I actually got the server up and running.

    The problem was that, when I tried to bring up tree2.jsp, I got a 500:
    Assertion Failed message when the HtmlTreeRenderer was in its
    encodeResursive method:



    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init
    parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init
    parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found,
    using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init
    parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found,
    using default value false
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init
    parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false
    [6/9/05 13:48:27:726 CDT] 51a6029e WebGroup E SRVE0026E: [Servlet
    Error]-[Assertion Failed]: javax.faces.FacesException: Assertion Failed
    at com.sun.faces.util.Util.doAssert(Util.java:1300)
    at
    com.sun.faces.renderkit.html_basic.CommandLinkRenderer.encodeBegin(CommandLinkRenderer.java:186)
    at
    javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:689)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeRecursive(HtmlTreeRenderer.java:557)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeNavigation(HtmlTreeRenderer.java:545)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeCurrentNode(HtmlTreeRenderer.java:328)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeTree(HtmlTreeRenderer.java:230)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeChildren(HtmlTreeRenderer.java:182)
    at
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:707)
    at
    javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:588)
    at
    javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:525)
    at org.apache.jsp._tree2._jspService(_tree2.java:858)
    at
    com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at
    com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at
    com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
    at
    com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:320)
    at
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
    at
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at
    com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at
    com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at
    com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
    at
    com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
    at
    com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
    at
    com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at
    com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    at
    com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at
    com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at
    com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
    at
    com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at
    com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

    2. Using the MyFaces implementation

    Then I created a brand new workspace and followed the Getting Started
    directions at http://www.myfaces.org, copying the following JAR files to my
    Web project's lib folder:

    myfaces-jsf-api.jar
    myfaces.jar
    jstl.jar
    jakarta-oro.jar
    commons-codec-1.2.jar
    commons-el.jar
    commons-fileupload-1.0.jar
    commons-logging.jar
    commons-validator.jar

    And I copied the contents from my downloaded myfaces-1.0.9\conf\web.xml to
    my web.xml file. However, after doing this, the server wouldn't even start
    up my Web project:

    [6/9/05 13:32:56:186 CDT] 312c4008 ApplicationMg A WSVR0200I: Starting
    application: Test4
    [6/9/05 13:32:56:264 CDT] 312c4008 WebContainer A SRVE0169I: Loading Web
    Module: Test4Web.
    [6/9/05 13:32:56:717 CDT] 312c4008 WebApp E SRVE0015E: Failure to
    initialize Web application Test4Web
    [6/9/05 13:32:56:748 CDT] 312c4008 WebGroup E SRVE0054E: An error
    occurred while loading Web application
    [6/9/05 13:32:56:764 CDT] 312c4008 DeployedAppli W WSVR0206E: Module,
    Test4Web.war, of application, Test4.ear/deployments/Test4, failed to start
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg W WSVR0101W: An error
    occurred starting, Test4
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg A WSVR0217I: Stopping
    application: Test4
    [6/9/05 13:32:56:826 CDT] 312c4008 ApplicationMg A WSVR0220I: Application
    stopped: Test4
    [6/9/05 13:32:56:842 CDT] 312c4008 HttpTransport A SRVE0171I: Transport http
    is listening on port 8,080.
    [6/9/05 13:32:58:873 CDT] 312c4008 HttpTransport A SRVE0171I: Transport
    https is listening on port 9,443.
    [6/9/05 13:32:58:889 CDT] 312c4008 RMIConnectorC A ADMC0026I: RMI Connector
    available at port 2809
    [6/9/05 13:32:58:920 CDT] 312c4008 WsServer A WSVR0001I: Server server1
    open for e-business


    3. Importing the entire WAR file

    I also tried importing the entire WAR file provided by one of the MyFaces
    JAR files. At least with that, I was able to bring up the tree2.jsp page,
    but when I clicked on the plus sign to expand the server side folder, my
    browser registered a JavaScript error indicating that a referenced object
    was undefined.

    - Brendan
  • CONNER, BRENDAN \(SBCSI\) at Jun 13, 2005 at 2:05 pm
    I did find one bug (that I logged to JIRA): the tree2 tag definition in myfaces_ext.tld had two attribute definitions for the attribute <id>. This caused id="string" to be interpreted as id=""string"" which caused an error saying that the value could not begin with a quote. It didn't accept id=string either because it said all values must be enclosed by quotes. And it didn't allow id to be omitted, because one of the attribute definitions made id mandatory.

    In my environment, removing the extra <id> definition in myfaces_ext.tld fixed the problem. It wasn't clear to me whether the definition making id mandatory should be removed, or whether the definition making it optional should be removed. I removed the one that defined id as mandatory, since id seems to be optional in most other tag definitions.

    - Brendan

    -----Original Message-----
    From: Bruno Aranda
    Sent: Friday, June 10, 2005 5:08 AM
    To: MyFaces Discussion
    Subject: Re: Getting MyFaces Components to Work under WSAD or RAD


    This information can be very useful for users with similar problems.
    Please, feel free to update the myfaces wiki at
    http://wiki.apache.org/myfaces :-)

    Regards,

    Bruno

    2005/6/9, CONNER, BRENDAN (SBCSI) <bc1378@sbc.com>:
    Thanks. I thought I already *was* going slow and steady, since I'm just
    trying to get a single tree component and single jsp to work. ;-) And my
    helloWorld.jsp did work on my trial 1 and trial 3 (listed in my previous
    post). Obviously, my helloWorld.jsp didn't work in trial 2 (in which I had
    tried to follow methodically the instructions on the MyFaces Web site),
    because my server wouldn't even start up.

    I'll continue playing around with it...

    Thanks again,

    - Brendan



    -----Original Message-----
    From: Cote.Mark@hydro.qc.ca
    Sent: Thursday, June 09, 2005 3:11 PM
    To: users@myfaces.apache.org
    Subject: RE: Getting MyFaces Components to Work under WSAD or RAD


    Brendan,

    We first built our projects over a year ago, so I don't quite remember
    the steps we took. However,
    my suggestion would be as follows:

    1) Create a new (and empty) dynamic web project with the wizard.
    2) At the 'Features' dialog, uncheck all the default ones ... you should add
    NO features, especially not the IBM JSF impl.
    3) Add only the MyFaces JSF impl jars in the 'lib' directory, etc... like
    the myfaces documentation says.
    4) Create a hello world jsp, using jsf's framework. Make sure it works.
    5) Methodically add you application components one at a time, testing them
    as you go. I noticed you tried getting your whole
    app to work at once with the myfaces impl. You might get lucky, and it
    could ... but slow and steady will always finish the
    race.


    HTH,



    Mark



    ________________________________

    De : CONNER, BRENDAN (SBCSI)
    Envoyé : jeudi 9 juin 2005 15:06
    À : MyFaces Discussion
    Objet : RE: Getting MyFaces Components to Work under WSAD or RAD




    Thanks Mark,

    Can you by any chance give a step by step list of things you did to get this
    to work (e.g., which JAR files you copied over, etc.)?

    I did a few experiments:

    1. Using the existing IBM implementation:

    I started out using the regular IBM implementation, just copying over the
    source for the Tree2 classes and any classes upon which they depended.
    Doing this, I actually got the server up and running.

    The problem was that, when I tried to bring up tree2.jsp, I got a 500:
    Assertion Failed message when the HtmlTreeRenderer was in its
    encodeResursive method:



    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init
    parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init
    parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found,
    using default value true
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init
    parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found,
    using default value false
    [6/9/05 13:48:27:367 CDT] 51a6029e MyfacesConfig I
    org.apache.myfaces.config.MyfacesConfig No context init
    parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value false
    [6/9/05 13:48:27:726 CDT] 51a6029e WebGroup E SRVE0026E: [Servlet
    Error]-[Assertion Failed]: javax.faces.FacesException: Assertion Failed
    at com.sun.faces.util.Util.doAssert(Util.java:1300)
    at
    com.sun.faces.renderkit.html_basic.CommandLinkRenderer.encodeBegin(CommandLinkRenderer.java:186)
    at
    javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:689)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeRecursive(HtmlTreeRenderer.java:557)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeNavigation(HtmlTreeRenderer.java:545)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeCurrentNode(HtmlTreeRenderer.java:328)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeTree(HtmlTreeRenderer.java:230)
    at
    org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeChildren(HtmlTreeRenderer.java:182)
    at
    javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:707)
    at
    javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:588)
    at
    javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:525)
    at org.apache.jsp._tree2._jspService(_tree2.java:858)
    at
    com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
    at
    com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at
    com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at
    com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
    at
    com.ibm.faces.context.MultipartExternalContextImpl.dispatch(MultipartExternalContextImpl.java:320)
    at
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:295)
    at
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at
    com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at
    com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at
    com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at
    com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at
    com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
    at
    com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
    at
    com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
    at
    com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
    at
    com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at
    com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    at
    com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at
    com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at
    com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
    at
    com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at
    com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

    2. Using the MyFaces implementation

    Then I created a brand new workspace and followed the Getting Started
    directions at http://www.myfaces.org, copying the following JAR files to my
    Web project's lib folder:

    myfaces-jsf-api.jar
    myfaces.jar
    jstl.jar
    jakarta-oro.jar
    commons-codec-1.2.jar
    commons-el.jar
    commons-fileupload-1.0.jar
    commons-logging.jar
    commons-validator.jar

    And I copied the contents from my downloaded myfaces-1.0.9\conf\web.xml to
    my web.xml file. However, after doing this, the server wouldn't even start
    up my Web project:

    [6/9/05 13:32:56:186 CDT] 312c4008 ApplicationMg A WSVR0200I: Starting
    application: Test4
    [6/9/05 13:32:56:264 CDT] 312c4008 WebContainer A SRVE0169I: Loading Web
    Module: Test4Web.
    [6/9/05 13:32:56:717 CDT] 312c4008 WebApp E SRVE0015E: Failure to
    initialize Web application Test4Web
    [6/9/05 13:32:56:748 CDT] 312c4008 WebGroup E SRVE0054E: An error
    occurred while loading Web application
    [6/9/05 13:32:56:764 CDT] 312c4008 DeployedAppli W WSVR0206E: Module,
    Test4Web.war, of application, Test4.ear/deployments/Test4, failed to start
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg W WSVR0101W: An error
    occurred starting, Test4
    [6/9/05 13:32:56:764 CDT] 312c4008 ApplicationMg A WSVR0217I: Stopping
    application: Test4
    [6/9/05 13:32:56:826 CDT] 312c4008 ApplicationMg A WSVR0220I: Application
    stopped: Test4
    [6/9/05 13:32:56:842 CDT] 312c4008 HttpTransport A SRVE0171I: Transport http
    is listening on port 8,080.
    [6/9/05 13:32:58:873 CDT] 312c4008 HttpTransport A SRVE0171I: Transport
    https is listening on port 9,443.
    [6/9/05 13:32:58:889 CDT] 312c4008 RMIConnectorC A ADMC0026I: RMI Connector
    available at port 2809
    [6/9/05 13:32:58:920 CDT] 312c4008 WsServer A WSVR0001I: Server server1
    open for e-business


    3. Importing the entire WAR file

    I also tried importing the entire WAR file provided by one of the MyFaces
    JAR files. At least with that, I was able to bring up the tree2.jsp page,
    but when I clicked on the plus sign to expand the server side folder, my
    browser registered a JavaScript error indicating that a referenced object
    was undefined.

    - Brendan
  • Kris Verhoye at Jun 13, 2005 at 2:51 pm
    Hi!

    My application messages always appear twice in the messages list. I have
    an x:messages tag in my pages with only an id and styleClass attribute,
    but the same happens when using the h:messages tag. What could I do
    wrong here? When I use h:message, the relative messages come out once.

    BTW, is it so that one never can be sure if a setter is going to be
    invoked, even if the value of the input hasn't been changed? What is the
    most common way to track changes then? An onchange listener?

    Thanks for any help!
    Kris
  • Martin Marinschek at Jun 13, 2005 at 2:56 pm
    Second question: yes, a valueChange Listener is the most common way to
    track changes i inputs.

    As for the first question: have you tried playing around with

    showDetail and showSummary as in:

    <x:messages errorClass="errorMessage" infoClass="infoMessage"
    showSummary="false" showDetail="true"/>

    regards,

    Martin

    On 6/13/05, Kris Verhoye wrote:
    Hi!

    My application messages always appear twice in the messages list. I have
    an x:messages tag in my pages with only an id and styleClass attribute,
    but the same happens when using the h:messages tag. What could I do
    wrong here? When I use h:message, the relative messages come out once.

    BTW, is it so that one never can be sure if a setter is going to be
    invoked, even if the value of the input hasn't been changed? What is the
    most common way to track changes then? An onchange listener?

    Thanks for any help!
    Kris
  • Kris Verhoye at Jun 13, 2005 at 3:17 pm
    Okido, thanks! I'll use the change listeners then...

    Regarding the messages tag: I'll try that again (though I think I tried
    it in the beginning), but I only have one message in my resource bundle
    (I don't use '_detail'): would the tag display messages twice even
    without such a detail entry in the bundle?

    Thanks again!!
    Kris

    -----Original Message-----
    From: Martin Marinschek
    Sent: 13 June 2005 16:56
    To: MyFaces Discussion; kris.verhoye@synergetic-solutions.be
    Subject: Re: General faces questions: messages, lifecycle


    Second question: yes, a valueChange Listener is the most common way to
    track changes i inputs.

    As for the first question: have you tried playing around with

    showDetail and showSummary as in:

    <x:messages errorClass="errorMessage" infoClass="infoMessage"
    showSummary="false" showDetail="true"/>

    regards,

    Martin

    On 6/13/05, Kris Verhoye wrote:
    Hi!

    My application messages always appear twice in the messages list. I
    have an x:messages tag in my pages with only an id and styleClass
    attribute, but the same happens when using the h:messages tag. What
    could I do wrong here? When I use h:message, the relative messages
    come out once.

    BTW, is it so that one never can be sure if a setter is going to be
    invoked, even if the value of the input hasn't been changed? What is
    the most common way to track changes then? An onchange listener?

    Thanks for any help!
    Kris
  • Kris Verhoye at Jun 14, 2005 at 12:06 pm
    Hi again!

    I've been reading through the lifecycle theory again and am confused about
    the way getters and setters are handled:

    How comes that a backing bean getter/setter may be called more than once
    during the lifecycle, and how does one initialize a list of selectItems
    stored in a session scoped bean that should be refreshed every request?

    If I perform the construction of the list in a getter, it would be executed
    more than once. I can't do it in the constructor however as the bean is not
    constructed every request...

    Cheers,
    Kris
  • Galen Dunkleberger at Jun 14, 2005 at 9:15 pm
    I had the same problem as you. My backing bean would often need to hit
    my business tier and subsequently my database tier in order to
    retrieve valid values for drop down lists. Obviously this starts to
    become expensive if jsf is hitting the managed bean getter multiple
    times. What i found to work (maybe someone knows a simpler way) was
    using aspectj and writing an aspect which cached the value returned
    from a backing bean getter method for the duration of a single
    request. This way if the managed bean's getter was called multiple
    times it would only run through the entire method once. Once the
    request has finished the cache is cleared so that on next request you
    be sure to get the latest values. I also wrote advice for setter
    methods of the managebean to be sure to update the cached value if it
    was present.

    Good luck
    On 6/14/05, Kris Verhoye wrote:
    Hi again!

    I've been reading through the lifecycle theory again and am confused about
    the way getters and setters are handled:

    How comes that a backing bean getter/setter may be called more than once
    during the lifecycle, and how does one initialize a list of selectItems
    stored in a session scoped bean that should be refreshed every request?

    If I perform the construction of the list in a getter, it would be executed
    more than once. I can't do it in the constructor however as the bean is not
    constructed every request...

    Cheers,
    Kris


  • Slawek at Jun 14, 2005 at 9:38 pm
    hmm i have never considered it as a problem cause im using jscookmenu...

    for example: when i want to see users i click on JSmenu action
    users.showAll() that return string mapped to
    users.jsp

    but this method is not trivial;) before return, method does all business
    logic so i dont need to perform any logic
    in getters.
    I had the same problem as you. My backing bean would often need to hit
    my business tier and subsequently my database tier in order to
    retrieve valid values for drop down lists. Obviously this starts to
    become expensive if jsf is hitting the managed bean getter multiple
    times. What i found to work (maybe someone knows a simpler way) was
    using aspectj and writing an aspect which cached the value returned
    from a backing bean getter method for the duration of a single
    request. This way if the managed bean's getter was called multiple
    times it would only run through the entire method once. Once the
    request has finished the cache is cleared so that on next request you
    be sure to get the latest values. I also wrote advice for setter
    methods of the managebean to be sure to update the cached value if it
    was present.

    Good luck
    On 6/14/05, Kris Verhoye wrote:
    Hi again!

    I've been reading through the lifecycle theory again and am confused
    about
    the way getters and setters are handled:

    How comes that a backing bean getter/setter may be called more than once
    during the lifecycle, and how does one initialize a list of selectItems
    stored in a session scoped bean that should be refreshed every request?

    If I perform the construction of the list in a getter, it would be
    executed
    more than once. I can't do it in the constructor however as the bean is
    not
    constructed every request...

    Cheers,
    Kris


  • Craig McClanahan at Jun 14, 2005 at 11:03 pm
    If your list of select items really should be constructed for every
    reequest, there's no reason to put it in a session scoped bean -- but
    it in a request scoped bean instead (either a common one for shared
    items lists, or a page-specific one if it's unique.

    To avoid constructing the list multiple times, even if the getter is
    called more than once (it will get called once per value binding
    expression that points at it), use a common Java idiom in the request
    scoped backing bean:

    private SelectItem items[] = null;

    public SelectItem[] getItems() {
    if (items == null) {
    items = ...; // Fill up the list
    }
    return items;
    }

    Craig

    On 6/14/05, Kris Verhoye wrote:
    Hi again!

    I've been reading through the lifecycle theory again and am confused about
    the way getters and setters are handled:

    How comes that a backing bean getter/setter may be called more than once
    during the lifecycle, and how does one initialize a list of selectItems
    stored in a session scoped bean that should be refreshed every request?

    If I perform the construction of the list in a getter, it would be executed
    more than once. I can't do it in the constructor however as the bean is not
    constructed every request...

    Cheers,
    Kris


  • Albartell at Jun 15, 2005 at 3:11 am
    Craig, regarding your first statement about making the bean a request scope
    vs session...

    Maybe I put too much into one backing bean (one backing bean runs multiple
    related screens) but in my case I need some values (say properties) to
    remain at session scope and others to be at request scope. This makes
    Galen's approach with AspectJ appealing, but it would be even better if I
    could specify right on the property that the getter method should only be
    called once. I have read most of the JSF spec and at the time had a 1,000
    ft understanding of why the getters weren't guaranteed to be called only
    once, but I would still like to see something implemented into the spec that
    allows the bypassing of a secondary call rather than implementing an
    "if(property==null)" type approach.

    I guess the question in my head is how would one elegantly code a property
    to execute its code only once in a bean that is session scoped? Because the
    below example will only work the first time the session bean is invoked, but
    the second visit to the page it will already be full (with old information).

    It would be cool to have a destroy() or destructor method for each backing
    bean for clean up purposes. I have pseudo implemented this with a method in
    my code called "cleanupConstructor()", but I ran into problems with my ORM
    solution's values getting waxed before data was persisted to the database
    (design flaw on my end).

    Aaron Bartell
    http://mowyourlawn.com



    -----Original Message-----
    From: Craig McClanahan
    Sent: Tuesday, June 14, 2005 11:14 AM
    To: MyFaces Discussion; kris.verhoye@mediamine.com
    Subject: Re: getter/setter, lifecycle

    If your list of select items really should be constructed for every
    reequest, there's no reason to put it in a session scoped bean -- but
    it in a request scoped bean instead (either a common one for shared
    items lists, or a page-specific one if it's unique.

    To avoid constructing the list multiple times, even if the getter is
    called more than once (it will get called once per value binding
    expression that points at it), use a common Java idiom in the request
    scoped backing bean:

    private SelectItem items[] = null;

    public SelectItem[] getItems() {
    if (items == null) {
    items = ...; // Fill up the list
    }
    return items;
    }

    Craig

    On 6/14/05, Kris Verhoye wrote:
    Hi again!

    I've been reading through the lifecycle theory again and am confused about
    the way getters and setters are handled:

    How comes that a backing bean getter/setter may be called more than once
    during the lifecycle, and how does one initialize a list of selectItems
    stored in a session scoped bean that should be refreshed every request?

    If I perform the construction of the list in a getter, it would be executed
    more than once. I can't do it in the constructor however as the bean is not
    constructed every request...

    Cheers,
    Kris


  • Craig McClanahan at Jun 15, 2005 at 3:21 am

    On 6/14/05, albartell wrote:
    Craig, regarding your first statement about making the bean a request scope
    vs session...

    Maybe I put too much into one backing bean (one backing bean runs multiple
    related screens) but in my case I need some values (say properties) to
    remain at session scope and others to be at request scope.
    Why are you hung up on using only one backing bean? Use as many as
    you need -- and needing different lifetimes for data is *definitely* a
    good reason to use more than one bean as necessary.

    This makes
    Galen's approach with AspectJ appealing, but it would be even better if I
    could specify right on the property that the getter method should only be
    called once.
    That's not the kind of restriction that well written applications
    impose on their callers :-). I already showed how (earlier in this
    thread) you can make the number of calls irrelevant.

    Seriously, you're going to want to use a similar technique ... so you
    might as well use it here too.

    I have read most of the JSF spec and at the time had a 1,000
    ft understanding of why the getters weren't guaranteed to be called only
    once, but I would still like to see something implemented into the spec that
    allows the bypassing of a secondary call rather than implementing an
    "if(property==null)" type approach.
    Very simple ... besides being bad design, it would be impossible to enforce.

    Consider a case where you have a method like this on an application
    scope bean (with the managed bean name "appicationBean"), to return an
    array of SelectItem[] for the abbreviations and names of the US
    states:

    public SelectItem[] getStates();

    Now, consider that you're writing an order entry application that has
    both a billing address and a shipping address on the same page. So,
    you end up with code like this:

    <h:selectOneDropDown id="billToState" ...>
    <h:selectItems ... value="#{applicationBean.states}"/>
    </h:selectOneDropDown>

    ...

    <h:selectOneDropDown id="shipToState" ...>
    <h:selectItems ... value="#{applicationBean.states}"/>
    </h:selectOneDropDown>

    So, getStates() is going to be called twice, right? Because the
    *application* wants to, right?

    It is not JSF's responsibility to ensure that you make sure
    getStates() is as efficient as possible.
    I guess the question in my head is how would one elegantly code a property
    to execute its code only once in a bean that is session scoped? Because the
    below example will only work the first time the session bean is invoked, but
    the second visit to the page it will already be full (with old information).
    I already posted an example of this earlier in this thread.
    It would be cool to have a destroy() or destructor method for each backing
    bean for clean up purposes. I have pseudo implemented this with a method in
    my code called "cleanupConstructor()", but I ran into problems with my ORM
    solution's values getting waxed before data was persisted to the database
    (design flaw on my end).
    If you like init() and destroy() on backing beans, you'll definitely
    like Shale :-)

    http://struts.apache.org/shale/
    Craig
  • Albartell at Jun 15, 2005 at 4:04 am
    Why are you hung up on using only one backing bean? Use as many as
    you need -- and needing different lifetimes for data is *definitely* a
    good reason to use more than one bean as necessary.

    I agree this is the direction I need to head. I was just concerned about
    the number of objects and how to organize (say name) them. I have used IBM's
    Websphere IDE and they create a backing bean per page which seems like the
    appropriate amount to create.

    ... It is not JSF's responsibility to ensure that you make sure
    getStates() is as efficient as possible.

    Given your example I would fully expect the getter to be called twice if
    there are two components on the screen accessing the same backing bean
    property. But that isn't the scenario I have. I instead have a single field
    (i.e. title - Mr., Ms., Mrs. etc) that is only specified once on the page,
    but the getter will still be called more than once in some instances.
    If you like init() and destroy() on backing beans, you'll definitely
    like Shale :-)

    Looks like I need to break down and do a little reading :-)

    Thanks for your response,
    Aaron Bartell
  • Craig McClanahan at Jun 15, 2005 at 4:33 am

    On 6/14/05, albartell wrote:
    Why are you hung up on using only one backing bean? Use as many as
    you need -- and needing different lifetimes for data is *definitely* a
    good reason to use more than one bean as necessary.

    I agree this is the direction I need to head. I was just concerned about
    the number of objects and how to organize (say name) them. I have used IBM's
    Websphere IDE and they create a backing bean per page which seems like the
    appropriate amount to create.
    Sun Java Studio Creator (disclaimer: that's the product I am
    architect for) goes a bit further -- we also create a session-scoped
    managed bean and an application-scoped managed bean for you. Then we
    make it easy to add property getters that can do caching-like things,
    and then bind to them.

    A request scoped backing bean per page is fine for stuff that only
    needs to be visible through the current request, for the current page.
    If you need stuff longer, keep it in a bean that is in a longer
    scope.
    ... It is not JSF's responsibility to ensure that you make sure
    getStates() is as efficient as possible.

    Given your example I would fully expect the getter to be called twice if
    there are two components on the screen accessing the same backing bean
    property. But that isn't the scenario I have. I instead have a single field
    (i.e. title - Mr., Ms., Mrs. etc) that is only specified once on the page,
    but the getter will still be called more than once in some instances.
    That all depends on how many expression evaluations occur, because JSF
    never calls these methods by itself ... it only resolves expressions
    for you.
    If you like init() and destroy() on backing beans, you'll definitely
    like Shale :-)

    Looks like I need to break down and do a little reading :-) Yep :-)
    Thanks for your response,
    Aaron Bartell Craig

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesmyfaces
postedJun 8, '05 at 6:59p
activeJun 15, '05 at 4:33a
posts23
users12
websitemyfaces.apache.org

People

Translate

site design / logo © 2019 Grokbase