JavaServer Faces Components...

Hello,
I am developering JSF component and I don't know where to put attributes description.
Will it be *.TLD or in faces-config.xml or in both? I found <attribute> element in web-facesconfig_1_1.dtd and in web-jsptaglibrary_1_2.dtd and they both contains similar attributes.
With regards,
Pavel Krupets

For instance in JSF samples (components):
There is an attribute named alt in components.tld:
<attribute>
  <name>alt</name>
  <required>false</required>
  <rtexprvalue>false</rtexprvalue>
  <description>
    Alternate text for a synthesized ImageArea bean.  The set of
    alt values for all hotspots in a particular map must be unique.
  </description>
</attribute>and property alt in faces-config.xml:
<property>
  <description>
    Alternate text if we synthesize an ImageArea bean.
  </description>
  <property-name>alt</property-name>
  <property-class>java.lang.String</property-class>
</property>They look the same but what is the point to have in both places? Maybe there is a good docs about it?

Similar Messages

  • JavaServer Faces and Portal Servers

    Hi all,
    Do you think JavaServer Faces will have substantial applications in developing the user interface for a portal server? To me, it seems like the whole portal page with the tabbed panes and other gadgets could be one large JavaServer Faces component, composed of many smaller JavaServer Faces components. The user interface for a portlet for instance would be a smaller component that is a part of the larger portal page component. Does this make sense to you?
    Your ideas are appreciated.
    Thanks,
    Mete

    Hello Craig,
    Thanks very much for your reply. I think this topic is an exciting one: Making portal servers and portlets integrate well with JavaServer Faces.
    You said that JavaServer Faces will make it easy for portal servers to contain portlets that have JavaServer Faces components in their GUI, but understandably this does not mean that portlets will be required to have a GUI that is made out of JavaServer Faces. The portal server should be tolerant to any kind of GUI that a portlet may be using. So, how would a portal server that has its portal layout built completely with JavaServer Faces work well with portlets that do not have a JavaServer Faces GUI? Would JavaServer Faces make it easy to to embed GUI markup from non-Faces portlets into a portal page that is generated by a master JavaServer Faces component that encapsulates the whole portal page layout?
    How could a scenario like this be handled:
    The user device is a handheld device, so the master portal page JavaServer Faces component decides to use a WML renderer for generating the portal page instead of an HTML renderer. All of the JavaServer Faces enabled portlets are generated using the WML renderer, but the portlets that do not have a JavaServer Faces GUI cannot be rendered in WML. What should the master portal page JavaServer Faces component do in this case?
    Thanks,
    Mete

  • Oracle ADF Faces Components, Early Access Release 8 is now available

    Oracle ADF Faces is a rich set of user interface components based on the new JavaServer Faces JSR (JSR-127). Oracle has been actively involved in this JSR since its beginning. The Oracle ADF Faces Components provide various user-interface components with built-in functionality - such as data tables, hierarchical tables, and color and date pickers - that can be customized and re-used in your application.
    ADF Faces also includes many of the framework features most needed by JSF developers today:
    * File upload support is integrated at a component level.
    * Client-side validation is automatically derived from Validators and Converters for an improved user experience.
    * A pageFlow scope makes it easier to pass values from one page to another.
    * A new hybrid state saving strategy gives developers the best of both client and server-side state saving.
    ADF Faces ensures a consistent look and feel for your application, allowing you to focus more on user interface interaction rather than look and feel compliance. The components support multi-language and translation implementation as well as accessibility features. ADF Faces Components use Partial Page Rendering (PPR) offering superior runtime interactivity. PPR allow the browser to just render a piece of a page instead of the entire page.
    The intention with this early access release is to give developers/architects an opportunity to evaluate JSF and Oracle's JSF component offering.
    Oracle ADF Faces Components can be used in any IDE that support JSF, including Oracle JDeveloper 10g.
    Oracle ADF Faces Components, EA8

    Jonas,
    It works if I include the following:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    The source is now:
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/EA8" prefix="af"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    </head>
    <body>
    <f:view>
    <af:outputText value="hello ADF Faces!"/>
    </f:view>
    </body>
    </html>
    Did I feel out something in my library entry?
    Thanks.

  • Javaserver faces rendering ui in jdev ide

    Hello, does anyone has experienced with the JavaServer Faces release 1.1_01 FCS, that the cardemo or other jsf application doesn't render the ui components in jdev 9.0.5.2 ide, having of course "execute tags in jsp visual editor" checked ?
    I hope ORACLE will provide very soon some enhancement in the jdev IDE to help building jsp app with jsf tags.
    Thank's for anyhelp or advice

    You can get an early access preview of the ADF Faces support here:
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/index.html

  • JavaServer Faces and Struts

    For those of you interested in using JavaServer Faces and Struts together (and my mailbox indicates that this is quite a few people :-), I'm happy to announce the immediate availability of an integration library that allows you to use the EA3 release of JavaServer Faces with a recent nightly build (20030216 or later) of Struts 1.1 -- it will also work with the upcoming 1.1-rc2 and 1.1-final releases -- together. Nightly builds of the integration library are available at <http://jakarta.apache.org/builds/jakarta-struts/nightly/struts-faces/>.
    The sources for this package are in the Struts CVS repository, in the "contrib/struts-faces" directory, and will be included in the source nightly distributions starting with the 20030307 version. It is not currently planned to include the struts-faces integration library with binary distributions of Struts 1.1, since it is still an EA quality release.
    See the README.txt file (included in the nightly build) for more information on running the example application and using the integration library in your own applications.

    What are the reasons not to have extended
    RequestProcessor from Struts with the
    capabilities of the FacesServlet... a sort of
    "FacesProcessor" (extended the regular
    RequestProcessor)? (should be nice for views
    with no JSF components: in order not to execute
    FacesServlet for each views , event if there is
    no JSF component in the view)It turned out that I needed a customized RequestProcessor anyway (a couple of the processXxx methods had to work differently), but it actually would have been more work incorporating FacesServlet directly into it. In essence, there is now (in the combined version) a "front controller" for UI events , FacesServlet, and a "middle controller" for form submit events (RequestProcessor). When a UI event happens that just causes the current page to be redisplayed (think of a tree control where you click on the "expand this node" icon), you don't really want the Struts controller servlet to even be bothered by this request. Indeed, if you're using a presentation that was based on DHTML+Javascript, such an event would have been handled on the client anyway, and would never have been sent to the server at all.
    The combined approach still supports Faces and non-Faces pages, though. This means you can migrate one page at a time and test things (which is exactly what I did when I ported the pages of the example app).

  • JavaServer Faces Unit Test Framework

    Based on my knowledge, there isn't any handy JSF Unit test tools. To facilitate UI developers and QAs to do test, I have created a prototype project to evaluate a solution.
    For a Simple JSF enabled JSP file:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
       <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" />
         <f:view>
              <h:form>
                <h:outputText value="Please input:"/>
                   <h:inputText id="input1"/>
                <br/>
                <h:outputText value="Please input a integer:"/>
                   <h:inputText style="width:50px;" converter="javax.faces.Integer"/>
                <h:commandButton value="Submit"/>     
           </h:form>
       </f:view>
    </jsp:root>writing a HttpUnit to this page is obviously difficult:
    1) Hard to pin-point the html element rendered by input1, because up-level NamingContainer h:form is missing id.
    2) More difficult to find the second InputText, because missing two ids.
    3) How to assert if the converter really works or not, we can't assert any object in PageBean by HttpUnit.
    4) Much more difficult to find those html element if there are several level NamingContainer, such as the component nested within "for-loop".
    I perfer not to write HttpUnit and seperate JUnit to PageBean, so if the follow JSP can be used in both test and production environment, work will be much easier:
    * test1.jsp
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:test="http://www.yourcompany.com/jsf/test"  xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
       <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" />
         <f:view>
            <test:parameter name="abc" value="def"/><!-- setting request parameter -->
              <h:form>
                <h:outputText value="Please input:"/>
                   <h:inputText>
                   <test:set value="hello"
    /> <!-- emulate inputing "hello" to the text box -->
                   <test:assert phase="afterUpdateModelValues" description="InputText1" var="input1" value="#{input1=='hello'}"/><!-- you can try other JSF phases as well, here var "input1" is parent jsf component -->
                      <test:assert description="InputText1" var="input1" value="#{input1=='hello'}"/>
    <!-- use default phase "afterRenderResponse", here var "input1" is HtmlElement fetched from rendered page by HttpUnit -->
                </h:inputText>
                <br/>
                <h:inputText style="width:50px;" converter="javax.faces.Integer">
                   <test:set actions="all" value="123"/>
                   <test:assert phase="afterUpdateModelValues" description="Input2 Class Name" var="input2CN" value="#{input2CN.class.name == 'java.lang.Integer'}"/>
                   <test:assert description="InputText2 value in afterRenderResponse phase" var="input2" value="#{input2=='123'}"/>
                   <test:assert description="InputText2 Style" var="input2Style" valueAttribute="style" value="#{input2Style=='width:20px;height:25px;'}"/>
                </h:inputText>
                <br/>
                <h:commandButton value="Submit">
                   <test:action description="Test Sumbit"/><!-- support multi actions -->
                </h:commandButton>     
           </h:form>
       </f:view>
    </jsp:root> For production jsp you can use normal url, http://server:port/yourapp/faces/test1.jsp, those test:xxx components won't do anything.
    For testing a single page, http://server:port/yourapp/faces/TestAction?view=/test1.jsp
    For testing more pages, http://server:port/yourapp/faces/TestAction?suite=/suite1.xml and write file:
    * suite1.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <TestSuite>
       <page>/test1.jsp</page>
       <page>/test2.jsp</page>
    </TestSuite> After running this test suite in sun jsf1.0 runtime, the result comes:
    <?xml version="1.0" encoding="UTF-8" ?>
    <Test suite="/suite1.xml">
      <Page id="/test1.jsp">
        <Action id="_id13" time="0 hour(s) 0 minute(s) 0 second(s) 31 millisecond(s)" description="Test Sumbit">
          <Assert id="_id5" description="InputText1">
             <afterUpdateModelValues pass="true" />
          </Assert>
          <Assert id="_id9" description="Input2 Class Name">
             <afterUpdateModelValues pass="true" />
          </Assert>
          <Assert id="_id6" description="InputText1">
             <afterRenderResponse pass="true" />
          </Assert>
          <Assert id="_id10" description="InputText2 value in afterRenderResponse phase">
             <afterRenderResponse pass="true" />
          </Assert>
          <Assert id="_id11" description="InputText2 Style">
             <afterRenderResponse pass="false" />
          </Assert>
        </Action>
      </Page>
      <Page id="/test2.jsp">
      </Page>
    </Test> So far, if you think this idea is good for you, you can get the src code at the end of this post.
    Furthermore, you can make improvement to this as well, such as implement concurrent and repeatable test.
    Anyway, don't expect this two days prototype is quite robust, and coding is not my day to day work either.
    If you have any questions or idea, please drop me a line: [email protected], [email protected]
    *  jsftest.tld
    <?xml version="1.0"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
         <tlib-version>1.0</tlib-version>
         <jsp-version>1.2</jsp-version>
         <short-name>test</short-name>
         <uri>http://www.yourcompany.com/jsf/test</uri>
         <display-name>JSF Test Tag Library</display-name>
         <description></description>
         <tag>
              <name>action</name>
              <tag-class>com.yourcompany.jsf.ui.test.taglib.ActionTag</tag-class>
              <body-content>empty</body-content>
              <display-name>Action</display-name>
              <description>JSF test submit action</description>
              <attribute>
                   <name>binding</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>id</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>description</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
         </tag>     
         <tag>
              <name>assert</name>
              <tag-class>com.yourcompany.jsf.ui.test.taglib.AssertTag</tag-class>
              <body-content>empty</body-content>
              <display-name>Assert</display-name>
              <description>JSF test assertion</description>
              <attribute>
                   <name>binding</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>id</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>actions</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
                            <description>default value is "all", means all actions, use "," as delimeter</description>
              </attribute>
              <attribute>
                   <name>phase</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
                            <description>effective value can be anyone of: afterRestoreView,
                                   beforeApplyRequestValues, afterApplyRequestValues,
                                   beforeProcessValidations, afterProcessValidations,
                                   beforeUpdateModelValues,  afterUpdateModelValues,
                                   beforeInvokeApplication,  afterInvokeApplication,
                                   beforeRenderResponse,     afterRenderResponse
                                 The default value is afterRenderResponse, this assertion will be applied to HtmlElement rather than JSF Component.
                            </description>
              </attribute>
              <attribute>
                   <name>value</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
                            <description>must be boolean, means pass test or not</description>
              </attribute>
              <attribute>
                   <name>var</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
                            <description>variable name, used to define a request attribute which can be used in valueBinding language</description>
              </attribute>
              <attribute>
                   <name>valueAttribute</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
                            <description>The default is "value".
                                         var will be bound to this attribute.
                                         var will be bound to the rendered HtmlElement if the phase="afterRenderResponse",
                                         otherwise var will be bound to parent component.
                            </description>
              </attribute>
              <attribute>
                   <name>postback</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
                            <description>The default is "true".
                                         Currently only support true;
                            </description>
              </attribute>
              <attribute>
                   <name>description</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
         </tag>
         <tag>
              <name>parameter</name>
              <tag-class>com.yourcompany.jsf.ui.test.taglib.ParameterTag</tag-class>
              <body-content>empty</body-content>
              <display-name>Set</display-name>
              <description>JSF test request parameter setter</description>
              <attribute>
                   <name>binding</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>id</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>actions</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
                            <description>default value is "all", means all actions, use "," as delimeter</description>
              </attribute>
              <attribute>
                   <name>name</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>value</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
         </tag>
         <tag>
              <name>set</name>
              <tag-class>com.yourcompany.jsf.ui.test.taglib.SetTag</tag-class>
              <body-content>empty</body-content>
              <display-name>Set</display-name>
              <description>JSF test component value setter</description>
              <attribute>
                   <name>binding</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>id</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>actions</name>
                   <required>false</required>
                   <rtexprvalue>true</rtexprvalue>
                            <description>default value is "all", means all actions, use "," as delimeter</description>
              </attribute>
              <attribute>
                   <name>value</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
         </tag>
    </taglib>
    *  faces-config.xml
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
      <component>
        <component-type>com.yourcompany.jsf.ui.test.Action</component-type>
        <component-class>com.yourcompany.jsf.ui.test.component.Action</component-class>
      </component>
      <component>
        <component-type>com.yourcompany.jsf.ui.test.Assert</component-type>
        <component-class>com.yourcompany.jsf.ui.test.component.Assert</component-class>
      </component>
      <component>
        <component-type>com.yourcompany.jsf.ui.test.Parameter</component-type>
        <component-class>com.yourcompany.jsf.ui.test.component.Parameter</component-class>
      </component>
      <component>
        <component-type>com.yourcompany.jsf.ui.test.Set</component-type>
        <component-class>com.yourcompany.jsf.ui.test.component.Set</component-class>
      </component>
      <lifecycle>
          <phase-listener>com.yourcompany.jsf.ui.test.listener.TestPhaseListener</phase-listener>
          <phase-listener>com.yourcompany.jsf.ui.test.listener.TestAssertPhaseListener</phase-listener>
      </lifecycle>
    </faces-config>
    *  TestPhaseListener.java
    package com.yourcompany.jsf.ui.test.listener;
    import java.io.InputStream;
    import java.lang.reflect.Method;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Iterator;
    import java.util.List;
    import javax.faces.application.ViewHandler;
    import javax.faces.component.UIComponent;
    import javax.faces.component.UIViewRoot;
    import javax.faces.context.FacesContext;
    import javax.faces.context.ResponseWriter;
    import javax.faces.event.PhaseEvent;
    import javax.faces.event.PhaseId;
    import javax.faces.event.PhaseListener;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import com.meterware.httpunit.HTMLElement;
    import com.meterware.httpunit.PostMethodWebRequest;
    import com.meterware.httpunit.WebConversation;
    import com.meterware.httpunit.WebRequest;
    import com.meterware.httpunit.WebResponse;
    import com.sun.faces.renderkit.html_basic.HtmlResponseWriter;
    import com.yourcompany.jsf.ui.component.UIIterate;
    import com.yourcompany.jsf.ui.test.component.Action;
    import com.yourcompany.jsf.ui.test.component.Assert;
    import com.yourcompany.jsf.ui.test.component.Parameter;
    import com.yourcompany.jsf.ui.test.component.Set;
    import com.yourcompany.jsf.ui.test.report.Constants;
    import com.yourcompany.jsf.ui.test.report.TestAction;
    import com.yourcompany.jsf.ui.test.report.TestAssert;
    import com.yourcompany.jsf.ui.test.report.TestPage;
    import com.yourcompany.jsf.ui.test.report.TestReport;
    import com.yourcompany.jsf.ui.util.ComponentUtil;
    public class TestPhaseListener implements PhaseListener {
         public TestPhaseListener() {
              super();
              // TODO Auto-generated constructor stub
         /* (non-Javadoc)
          * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
         public void afterPhase(PhaseEvent event) {
              if(-1 != event.getFacesContext().getViewRoot().getViewId().indexOf("TestAction")){
                   FacesContext context =      event.getFacesContext();
                   ViewHandler vh = context.getApplication().getViewHandler();
                   HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
                   TestReport report = new TestReport();
                   request.getSession().setAttribute(Constants.TEST_REPORT_SESSION_ATTRIBUTE_ID, report);
                   String suitefile = request.getParameter("suite");
                   List pages = new ArrayList(5);
                   if(suitefile==null){
                        pages.add(request.getParameter("view"));
                   }else{
                        report.setSuiteId(suitefile);
                        try{
                             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                          factory.setValidating(false);
                          factory.setNamespaceAware(false);
                          DocumentBuilder builder = factory.newDocumentBuilder();
                          InputStream ins = context.getExternalContext().getResourceAsStream(suitefile);
                          Document doc = builder.parse(ins);
                          NodeList pageNodes = doc.getElementsByTagName("page");
                          for(int i=0; i<pageNodes.getLength(); i++){
                               pages.add(((Text)pageNodes.item(i).getFirstChild()).getData());
                        }catch(Exception e){
                             report.setException(e);
                   for(Iterator p=pages.iterator(); p.hasNext(); ){
                        String viewId = (String)p.next();
                        UIViewRoot view = vh.restoreView(context, viewId);
                        if(view==null){
                             try{
                                WebConversation wc = new WebConversation();
                                wc.putCookie("JSESSIONID", request.getSession().getId());
                                String url = getUrl(request, viewId);
                                WebResponse wr = wc.getResponse(url);
                             }catch(Exception e){
                                  report.setException(e);
                             view = vh.restoreView(context, viewId);
                        try{
                             Method doActionMethod = TestPhaseListener.class.getDeclaredMethod("doAction", new Class[]{Action.class, FacesContext.class, HttpServletRequest.class, UIViewRoot.class, String.class});
                             ComponentUtil.iterateComponent(view, Action.class, this, doActionMethod, new Object[]{context, request, view, viewId});
                        }catch(Exception e){
                             report.setException(e);
                   //render report
                   renderReport(context, report);
                   request.getSession().removeAttribute(Constants.TEST_REPORT_SESSION_ATTRIBUTE_ID);
                   context.responseComplete();
         /* (non-Javadoc)
          * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
         public void beforePhase(PhaseEvent event) {
         /* (non-Javadoc)
          * @see javax.faces.event.PhaseListener#getPhaseId()
         public PhaseId getPhaseId() {
               return PhaseId.RESTORE_VIEW;
         private String getUrl(HttpServletRequest request, String viewId){
              return request.getScheme()+"://" + request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/faces"+viewId;
         protected void doAction(Action action, FacesContext context, HttpServletRequest request, UIViewRoot view, String viewId){
              try{
                      WebConversation wc = new WebConversation();
                      wc.putCookie("JSESSIONID", request.getSession().getId());
                      String url = getUrl(request, viewId);
                      WebRequest wrq = new PostMethodWebRequest(url);
                      wrq.setParameter(Constants.TEST_VIEW_PARAMETER, viewId);
                      wrq.setParameter(Constants.TEST_ACTION_PARAMETER, action.getId());
                      //set parameters
                      try{
                           Method doParameterMethod = TestPhaseListener.class.getDeclaredMethod("doParameter", new Class[]{Parameter.class, String.class, WebRequest.class});
                           ComponentUtil.iterateComponent(view, Parameter.class, this, doParameterMethod, new Object[]{action.getId(), wrq});
                      }catch(Exception e){
                           e.printStackTrace();
                      //set attributes
                      //set values
                      try{
                           Method doSetMethod = TestPhaseListener.class.getDeclaredMethod("doSet", new Class[]{Set.class, FacesContext.class, String.class, WebRequest.class});
                           ComponentUtil.iterateComponent(view, Set.class, this, doSetMethod, new Object[]{context, action.getId(), wrq});
                      }catch(Exception e){
                           e.printStackTrace();
                      //do test actions
                      String formId = null;
                      if(formId!=null)wrq.removeParameter(formId);
                      formId = ComponentUtil.getForm(action).getClientId(context);
                      wrq.setParameter(formId, action.getParent().getClientId(context));
                      long start = System.currentTimeMillis();
                      WebResponse wrp = wc.getResponse(wrq);
                      //System.out.println(wrp.getText());
                      //do assertions
                      try{
                           Method doAssertMethod = TestPhaseListener.class.getDeclaredMethod("doAssert", new Class[]{Assert.class, FacesContext.class, HttpServletRequest.class, String.class, String.class, String.class, WebResponse.class});
                           ComponentUtil.iterateComponent(view, Assert.class, this, doAssertMethod, new Object[]{context, request, viewId, action.getId(), action.getDescription(), wrp});
                      }catch(Exception e){
                           e.printStackTrace();
                      TestReport report = (TestReport)request.getSession().getAttribute(Constants.TEST_REPORT_SESSION_ATTRIBUTE_ID);
                     report.getPage(viewId).getAction(action.getId()).setTime(System.currentTimeMillis()-start);
                   }catch(Exception e){
                        e.printStackTrace();
         protected void doParameter(Parameter parameter, String actionId, WebRequest wrq){
               if("all".equals(parameter.getActions()) || Arrays.asList(parameter.getActions().split(",")).contains(actionId))wrq.setParameter(parameter.getName(), parameter.getValue());
         protected void doSet(Set set, FacesContext context, String actionId, WebRequest wrq){
               if("all".equals(set.getActions()) || Arrays.asList(set.getActions().split(",")).contains(actionId))wrq.setParameter(set.getParent().getClientId(context), set.getValue());
         protected void doAssert(Assert ast, FacesContext context, HttpServletRequest request, String viewId, String actionId, String actionDescription, WebResponse wrp){
              if(("all".equals(ast.getActions()) || Arrays.asList(ast.getActions().split(",")).contains(actionId)) && "afterRenderResponse".equals(ast.getPhase())){
                    TestReport report = (TestReport)request.getSession().getAttribute(Constants.TEST_REPORT_SESSION_ATTRIBUTE_ID);
                    try{
                         HTMLElement targetElement = wrp.getElementWithID(ast.getParent().getClientId(context));
                         if(targetElement==null)targetElement = wrp.getElementsWithName(ast.getParent().getClientId(context))[0];
                         if(targetElement==null)request.setAttribute(ast.getVar(), null);
                         else request.setAttribute(ast.getVar(), targetElement.getAttribute(ast.getValueAttribute()));
                         //report assert
                         report.report(viewId, actionId, actionDescription, ast.getId(), ast.getDescription(), ast.getPhase(), (Boolean)ast.getValue(), null);
                    }catch(Exception e){
                         report.report(viewId, actionId, actionDescription, ast.getId(), ast.getDescription(), ast.getPhase(), Boolean.FALSE, e);
         protected void renderReport(FacesContext context, TestReport report){
              try{
                   HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
                   response.setContentType("text/xml; charset=UTF-8");
                   response.setHeader("Cache-Control", "no-cache");
                   ResponseWriter writer = new HtmlResponseWriter(response.getWriter(), null, null);
                   context.setResponseWriter(writer);
                   writer.startDocument();
                   writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");
                   writer.startElement("Test", null);
                   if(report.getSuiteId()!=null)writer.writeAttribute("suite", report.getSuiteId(), null);
                   for(Iterator p=report.listPages().iterator(); p.hasNext(); ){
                        TestPage page = (TestPage)p.next();
                        writer.startElement("Page", null);
                        writer.writeAttribute("id", page.getViewId(), null);
                        for(Iterator i=page.listActions().iterator(); i.hasNext(); ){
                             TestAction action = (TestAction)i.next();
                             writer.startElement("Action", null);
                             writer.writeAttribute("id", action.getId(), null);
                             writer.writeAttribute("time", getElapsedTime(action.getTime()), null);
                             if(action.getDescription()!=null)writer.writeAttribute("description", action.getDescription(), null);
                             for(Iterator j=action.getAsserts().values().iterator(); j.hasNext(); ){
                                  TestAssert ast = (TestAssert)j.next();
                                  writer.startElement("Assert", null);
                                  writer.writeAttribute("id", ast.getId(), null);
                                  if(ast.getDescription()!=null)writer.writeAttribute("description", ast.getDescription(), null);
                                  for(Iterator k=ast.getStatus().keySet().iterator(); k.hasNext(); ){
                                       String phase = (String)k.next();
                                       writer.startElement(phase, null);
                                       writer.writeAttribute("pass", ast.getStatus().get(phase).toString(), null);
                                       writer.endElement(phase);
                                  if(ast.getException()!=null){
                                       writer.startElement("Exception", null);
                                       StackTraceElement[] stack = ast.getException().getStackTrace();
                                       for(int m=0; m<stack.length; m++){
                                            writer.write(stack[m].toString());
                                            writer.write("\r\n");
                                       writer.endElement("Exception");
                                  writer.endElement("Assert");
                             if(action.getException()!=null){
                                  writer.startElement("Exception", null);
                                  StackTraceElement[] stack = action.getException().getStackTrace();
                                  for(int m=0; m<stack.length; m++){
                                       writer.write(stack[m].toString());
                                       writer.write("\r\n");
                                  writer.endElement("Exception");
                             writer.endElement("Action");
                        if(page.getException()!=null){
                             writer.startElement("Exception", null);
                             StackTraceElement[] stack = page.getException().getStackTrace();
                             for(int m=0; m<stack.length; m++){
                                  writer.write(stack[m].toString());
                                  writer.write("\r\n");
                             writer.endElement("Exception");
                        writer.endElement("Page");
                   if(report.getException()!=null){
                        writer.startElement("Exception", null);
                        StackTraceElement[] stack = report.getException().getStackTrace();
                        for(int m=0; m<stack.length; m++){
                             writer.write(stack[m].toString());
                             writer.write("\r\n");
                        writer.endElement("Exception");
                   writer.endElement("Test");
                   writer.endDocument();
                   response.getWriter().flush();
                   response.getWriter().close();
              }catch(Exception e){
                   e.printStackTrace();
          public static String getElapsedTime(long millis) {
                   long hours, minutes, seconds, ms;
                   hours = millis / 3600000;
                   millis = millis - (hours * 3600000);
                   minutes = millis / 60000;
                   millis = millis - (minutes * 60000);
                   seconds = millis / 1000;
                   ms = millis - (seconds * 1000);
                   return hours
                        + " hour(s) "
                        + minutes
                        + " minute(s) "
                        + seconds
                        + " second(s) "
                        + ms
                        + " millisecond(s)";
    *  TestAssertPhaseListener.java
    package com.yourcompany.jsf.ui.test.listener;
    import java.lang.reflect.Method;
    import java.util.Arrays;
    import javax.faces.component.UIViewRoot;
    import javax.faces.context.FacesContext;
    import javax.faces.event.PhaseEvent;
    import javax.faces.event.PhaseId;
    import javax.faces.event.PhaseListener;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.commons.beanutils.PropertyUtils;
    import com.yourcompany.jsf.ui.test.component.Assert;
    import com.yourcompany.jsf.ui.test.report.Constants;
    import com.yourcompany.jsf.ui.test.report.TestReport;
    import com.yourcompany.jsf.ui.util.ComponentUtil;
    public class TestAssertPhaseListener implements PhaseListener {
         public TestAssertPhaseListener() {
              super();
              // TODO Auto-generated constructor stub
         /* (non-Javadoc)
          * @see javax.faces.event.PhaseListener#afterPhase(javax.faces.event.PhaseEvent)
         public void afterPhase(PhaseEvent event) {
              if(PhaseId.RENDER_RESPONSE.equals(event.getPhaseId()))return;
              iterateAssert(event, false);
         /* (non-Javadoc)
          * @see javax.faces.event.PhaseListener#beforePhase(javax.faces.event.PhaseEvent)
         public void beforePhase(PhaseEvent event) {
              if(PhaseId.RESTORE_VIEW.equals(event.getPhaseId()))return;
              iterateAssert(event, true);
         public PhaseId getPhaseId() {
               return PhaseId.ANY_PHASE;
         protected void iterateAssert(PhaseEvent event, boolean before){
              FacesContext context = event.getFacesContext();
              HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
              String viewId = request.getParameter(Constants.TEST_VIEW_PARAMETER);
              String actionId = request.getParameter(Constants.TEST_ACTION_PARAMETER);
              if(actionId!=null){
                   TestReport report = (TestReport)request.getSession().getAttribute(Constants.TEST_REPORT_SESSION_ATTRIBUTE_ID);
                   UIViewRoot view = context.getViewRoot();
                   if(view==null)return;
                   try{
                        Method doAssertMethod = TestAssertPhaseListener.class.getDeclaredMethod("doAssert", new Class[]{Assert.class, FacesContext.class, HttpServletRequest.class, String.class, String.class, String.class});
                        ComponentUtil.iterateComponent(view, Assert.class, this, doAssertMethod, new Object[]{context, request, viewId, actionId, this.getAssertPhase(event.getPhaseId(), before)});
                   }catch(Exception e){
                        report.getPage(viewId).getAction(actionId).setException(e);
         protected void doAssert(Assert ast, FacesContext context, HttpServletRequest request, String viewId, String actionId, String assertPhase){
               if(("all".equals(ast.getActions()) || Arrays.asList(ast.getActions().split(",")).contains(actionId)) && assertPhase.equals(ast.getPhase())){
                    TestReport report = (TestReport)request.getSession().getAttribute(Constants.TEST_REPORT_SESSION_ATTRIBUTE_ID);
                    try{
                         request.setAttribute(ast.getVar(), PropertyUtils.getProperty(ast.getParent(), ast.getValueAttribute()));
                         //report assert
                         report.report(viewId, actionId, null, ast.getId(), ast.getDescription(), ast.getPhase(), (Boolean)ast.getValue(), null);
                    }catch(Exception e){
                         report.report(viewId, actionId, null, ast.getId(), ast.getDescription(), ast.getPhase(), Boolean.FALSE, e);
         protected String getAssertPhase(PhaseId phaseId, boolean before){
              String perfix = before ? "before" : "after";
              if(PhaseId.RESTORE_VIEW.equals(phaseId))return perfix+"RestoreView";
              if(PhaseId.APPLY_REQUEST_VALUES.equals(phaseId))return perfix+"ApplyRequestValues";
              if(PhaseId.PROCESS_VALIDATIONS.equals(phaseId))return perfix+"ProcessValidations";
              if(PhaseId.UPDATE_MODEL_VALUES.equals(phaseId))return perfix+"UpdateModelValues";
              if(PhaseId.INVOKE_APPLICATION.equals(phaseId))return perfix+"InvokeApplication";
              if(before && PhaseId.RENDER_RESPONSE.equals(phaseId))return "beforeRenderResponse";
              return "";
    *  UIIterate.java
    // This class brings "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

    To Neoreborn:
    If I understand right, Shale only provides some mock core JSF objects and extends JUnit so that you can do junit test to your java classes.
    What I concern is to test Pages(JSP) rather than java classes. I want to assert component attribute values within all lifecycle including rendered HTML script. Currently, there isn't any good tools to do this kind of JSP Unit test, am I right?

  • A question about Lifecycle of a JavaServer Faces.

    hello all
    i read "The JavaServer� Faces Technology Tutorial",and mazed about Lifecycle of a JavaServer Faces.
    It explains each of these lifecycle phases using the guessNumber example.
    and if i submit the greeting.jsp ,who can give me particular about the jsf done in order....and the first step :Reconstitute Component Tree reconstitute greeting.jsp 's component tree or response.jsp?..

    thanks!
    i have another question:when the action event or A value-changed event occured,any Standard Request Processing Lifecycle begin?and the step of Reconstitute Component Tree occured?and when occur action event and when occur application event if a button or hyperlink is clicked?and what differentness between the processing to action event and application event by jsf?

  • ADF Faces Components in a Portal

    Hi,
    We have managed to use the ADF Faces components in a normal web environment, but have had problems when using the components in a portal environment. We are using the JSF portlet bridge classes for rendering portlets. We are getting a ClassCastException in the FacesServlet... Anyone used these components in a portal and know how to get around this problem?
    Thanks.

    what is the stack trace of the exception?

  • Stored procedure, EJB, JPA, and JavaServer Faces

    Hi!
    I am currently working on a Web application using EJB, JPA, and JavaServer Faces. A part of the
    business logic is already stored in the database as stored procedures, so we need to call those
    procedures (instead of named queries) through a EJB and represent the data on the web tier.
    Where can I find an extensive tutorial using this technology? There is no such tutorial in the Oracle Learning Library.
    Maybe somebody can provide a link and/or example.
    Thanks in advance for your help!

    Hi,
    http://download.oracle.com/docs/cd/B10464_05/web.904/b10313/queries.htm#1135305
    For more help, see the TopLink / JPA forum
    TopLink/JPA
    Frank

  • JDeveloper 10.1.3.4.0: Controlling HTML formatting of ADF Faces components

    I have been investigating the ADF Faces components, and some of them write a fairly substantial block of HTML to the browser.
    The inputText, for example, renders an HTML table containing, among other things, an input, required field indicator, and a span for error display.
    This would appear to limit the amount of control a page designer would have over the precise layout of these sub-elements.
    We are en E-Commerce shop, so the ability to control the exact layout of our pages is critical to our business.
    Are the ADF Faces components going to allow us the fine-grained UI control we need?
    It could be a coincidence, but it seems as if all the real-world application examples in the ADF documentation seem to be business-type applications,
    where the UI is right out of the box with minimal tweaking.
    Thanks,
    Jonathan

    Jonathan,
    For a label above the text you can use this:
                <af:group>
                  <af:outputLabel value="outputLabel1"/>
                  <af:inputText/>
                </af:group>You can also achieve a lot of other customization with skins for ADF Faces components.
    But more to the point - since the JSF components offer you more then just basic HTML component I guess there might be a limit to the customization you can do to them.
    At the end your company will need to make the call on what is more valuable - the ability to stick exactly to a style or the ability to use components with rich functionality that save you coding.
    Think for example how much coding on the client you'll need to do in standard JSP/HTML to achieve what the ADF Table component gives you out of the box (sorting, range paging, detail disclosure, banding, etc). Maybe it is worthwhile to be a little more flexible on the layout issues instead of ending up wasting a lot of time writing these code.
    In any case even if you choose to go with plain JSP and Struts or with plain JSF and the plain JSF components - the ADF framework will still enable you to do drag and drop binding to your UI.
    The benefit of the ADF Faces components is the built in functionality they provide with things like partial page rendering, Ajax functionality etc...

  • ADF Faces Components Demo - Illegal Characters error

    Hi ,
    I downloaded the ADF Faces Components Demo for version 11.1.2.3.0 from http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html . I tried following instructions :ADF Faces Components Demo Install Instructions
    This is getting downloaded as rcf-dvt-demo.zip. I renamed it to rcf-dvt-demo.war.
    Then I tried to create a project from this war... and got following error :
    The project file "C:\rcf-dvt-demo.war!\Project.jpr" is not valid. The file name may contain illegal characters, it may be too long, or permissions for this file or one of it's parent directories may be restricted.
    Please help . Am i downloading from correct location and following the correct instructions.
    Thanks,
    Rajdeep

    Good Catch Timo ... Lot of thanks.
    Still I will put down the silly mistake of overlooking the wizard.
    I was doing the correct thing - "create a new application and inside this application workspace you add a new 'project from war'." But mistake was .. First step of wizard it is project name and path,, and then second step is war location... and in hurry I was giving the project name and war location in first step.
    Thanks,
    Rajdeep

  • Weblogic 10 Probs Start Web App only if using 'Visual Web JavaServer Faces'

    There is no Errormessage in Netbeans IDE when I chose 'build' or 'undeploy and deploy'.
    If I use a simple Webapplication that does not use 'Visual Web JavaServer Faces'
    the war-file that netbeans ide creates and deploys in beas autodeploy directory can be executed in the linked page: http://localhost:7001/WebApplication9/
    But if I chose the option 'Visual Web JavaServer Faces' in the web application project the whole compile and deployment process completes fine, the war-file is distributed in the autodeploy dir, but it can be deployed automatically nor manually.
    In the Bea Weblogic Administration Console I get
    Messages
    An error occurred during activation of changes, please see the log for details.
    Failed to load webapp: 'WebApplication14.war'
    javax.faces.webapp.FacesServlet
    C:\BeaWebLogic\MyDeploy\WebApplication14.war.
    Please make sure that the annotations are valid. The error is javax.faces.webapp.FacesServlet>
    whole Errorlog
    Thanks in advance.
    [LoginFilter]: LoginFilter constructed ...
    <18.04.2008 12.53 Uhr CEST> <Notice> <Log Management> <BEA-170027> <The server i
    nitialized the domain log broadcaster successfully. Log messages will now be bro
    adcasted to the domain log.>
    <18.04.2008 12.53 Uhr CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to ADMIN>
    <18.04.2008 12.53 Uhr CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to RESUMING>
    <18.04.2008 12.53 Uhr CEST> <Notice> <Security> <BEA-090171> <Loading the identi
    ty certificate and private key stored under the alias DemoIdentity from the jks
    keystore file C:\BEAWEB~1\WLSERV~1.0\server\lib\DemoIdentity.jks.>
    <18.04.2008 12.53 Uhr CEST> <Notice> <Security> <BEA-090169> <Loading trusted ce
    rtificates from the jks keystore file C:\BEAWEB~1\WLSERV~1.0\server\lib\DemoTrus
    t.jks.>
    <18.04.2008 12.53 Uhr CEST> <Notice> <Security> <BEA-090169> <Loading trusted ce
    rtificates from the jks keystore file C:\BEAWEB~1\JROCKI~1\jre\lib\security\cace
    rts.>
    <18.04.2008 12.53 Uhr CEST> <Warning> <Server> <BEA-002611> <Hostname "localhost
    ", maps to multiple IP addresses: 164.24.95.242, 127.0.0.1>
    <18.04.2008 12.53 Uhr CEST> <Warning> <Server> <BEA-002611> <Hostname "W9G01486.
    bonn02.telekom.de", maps to multiple IP addresses: 164.24.95.242, 127.0.0.1>
    <18.04.2008 12.53 Uhr CEST> <Notice> <Server> <BEA-002613> <Channel "Default" is
    now listening on 164.24.95.242:7001 for protocols iiop, t3, ldap, snmp, http.>
    <18.04.2008 12.53 Uhr CEST> <Notice> <Server> <BEA-002613> <Channel "Default[1]"
    is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
    <18.04.2008 12.53 Uhr CEST> <Notice> <Server> <BEA-002613> <Channel "DefaultSecu
    re" is now listening on 164.24.95.242:7002 for protocols iiops, t3s, ldaps, http
    s.>
    <18.04.2008 12.53 Uhr CEST> <Notice> <Server> <BEA-002613> <Channel "DefaultSecu
    re[1]" is now listening on 127.0.0.1:7002 for protocols iiops, t3s, ldaps, https
    .>
    <18.04.2008 12.53 Uhr CEST> <Notice> <WebLogicServer> <BEA-000331> <Started WebL
    ogic Admin Server "examplesServer" for domain "wl_server" running in Development
    Mode>
    <18.04.2008 12.53 Uhr CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state
    changed to RUNNING>
    <18.04.2008 12.53 Uhr CEST> <Notice> <WebLogicServer> <BEA-000360> <Server start
    ed in RUNNING mode>
    <18.04.2008 13.13 Uhr CEST> <Warning> <netuix> <BEA-423420> <Redirect is execute
    d in begin or refresh action. Redirect url is /console/console.portal?_nfpb=true
    &_pageLabel=WebAppApplicationOverviewPage&WebAppApplicationOverviewPortlethandle
    =com.bea.console.handles.AppDeploymentHandle%28%22com.bea%3AName%3DWebApplicatio
    n14%2CType%3DAppDeployment%22%29.>
    <18.04.2008 13.13 Uhr CEST> <Error> <HTTP> <BEA-101371>
    <There was a failure when processing annotations for application
    C:\BeaWebLogic\MyDeploy\WebApplication14.war.
    Please make sure that the annotations are valid. The error is javax.faces.webapp.FacesServlet>
    <18.04.2008 13.13 Uhr CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in
    the execution of deployment request with ID '1208517199484' for task '0'. Error
    is: 'weblogic.application.ModuleException: Failed to load webapp: 'WebApplicati
    on14.war''
    weblogic.application.ModuleException: Failed to load webapp: 'WebApplication14.w
    ar'
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:311)
    at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedM
    oduleDriver.java:176)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
    leListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
    oymentCallbackFlow.java:360)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
    Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:286)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
    Loader.java:259)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAw
    areClassLoader.java:54)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    Truncated. see log file for complete stacktrace
    >
    <18.04.2008 13.13 Uhr CEST> <Warning> <Deployer> <BEA-149004> <Failures were det
    ected while initiating distribute task for application 'WebApplication14'.>
    <18.04.2008 13.13 Uhr CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for m
    essage 149004
    weblogic.application.ModuleException: Failed to load webapp: 'WebApplication14.w
    ar'
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:311)
    at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedM
    oduleDriver.java:176)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
    leListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
    oymentCallbackFlow.java:360)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
    Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:286)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
    Loader.java:259)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAw
    areClassLoader.java:54)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    Truncated. see log file for complete stacktrace
    >
    <18.04.2008 13.13 Uhr CEST> <Error> <Console> <BEA-240003> <Console encountered
    the following error weblogic.application.ModuleException: Failed to load webapp:
    'WebApplication14.war'
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:311)
    at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedM
    oduleDriver.java:176)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu
    leListenerInvoker.java:93)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl
    oymentCallbackFlow.java:360)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
    loymentCallbackFlow.java:56)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep
    loymentCallbackFlow.java:46)
    at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja
    va:615)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j
    ava:191)
    at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme
    ntStateChecker.java:147)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App
    ContainerInvoker.java:61)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr
    eateAndPrepareContainer(ActivateOperation.java:189)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do
    Prepare(ActivateOperation.java:87)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr
    epare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym
    entPrepare(DeploymentManager.java:719)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy
    mentList(DeploymentManager.java:1186)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare
    (DeploymentManager.java:248)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre
    pare(DeploymentServiceDispatcher.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
    ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
    ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb
    ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin
    gWorkManagerImpl.java:464)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:286)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClass
    Loader.java:259)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAw
    areClassLoader.java:54)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:179)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAw
    areClassLoader.java:35)
    at weblogic.servlet.internal.WebAnnotationProcessorImpl.processServlets(
    WebAnnotationProcessorImpl.java:214)
    at weblogic.servlet.internal.WebAnnotationProcessorImpl.processJ2eeAnnot
    ations(WebAnnotationProcessorImpl.java:197)
    at weblogic.servlet.internal.WebAnnotationProcessorImpl.processAnnotatio
    ns(WebAnnotationProcessorImpl.java:93)
    at weblogic.servlet.internal.WebAppServletContext.processAnnotations(Web
    AppServletContext.java:1270)
    at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletCo
    ntext.java:408)
    at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletCo
    ntext.java:452)
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:402)
    at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.ja
    va:582)
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:298)
    >

    Hi,
    make sure you created the parameter for the bind variable in the ViewObject. It is not enough to only add the bind parameter. It has to be created as well
    Frank

  • Download javaServer faces business objects enterprise

    Post Author: gzofera
    CA Forum: JAVA
    hello, where do I download the javaServer face enterprise business objects?
    I am preparing an environment to start customizing web intelligence, and I lost well as to libraries, tools, etc.. which FDI sweat, ECLIPSE? NETBEANS? OTHER? WHERE THE PLUGINS FOR MEETING SET THE SDK? is there any tool that characterizes the Gazette to customize the WEBI? thanks

    Post Author: amr_foci
    CA Forum: JAVA
    i didnt know that there is something like that from Business Objects,  thats work in JSF layer
    but you can check you ESD if you've an account
    https://businessobjects.subscribenet.com/control/bobj/login
    good luck

  • [ANNOUNCE] JavaServer Faces Resources Page

    Hi Everyone,
    I've compiled a list of everything related to JavaServer Faces and put a page on my website for it.
    Here it is:
    http://www.jamesholmes.com/JavaServerFaces/
    If you see anything that I've missed, feel free to drop me a line.
    -James
    [email protected]

    well did you notice that JSF EA4 has just been released ?
    I have one more link (but in french) :
    http://www.builder.fr/story/0,,t541-s2134284,00.html
    It says "Struts is dead, live JSF" (bad translation maybe...)

  • Has JavaServer Faces reached beta?

    I know---please forgive my sarcasm. (I'm sure you've been at this point, too, in your programming career. I'll just vent a little.) I've only spent several days trying to create a simple page I could have coded in a couple of hours in any given language---Java, C++, 80x86 assembler---but not JavaServer Faces.
    Has anyone created any real applications in JSF? It's practically unusable in the real world. I'm about to throw it all away for JSP and JSTL. Here's why:
    * I can't pass parameters to bean methods in the expression language.
    * dataTable can't create <th> except in a header facet, and a header facet can't access data being iterated.
    * There's no way to specify different styles for different <th> elements in a dataTable.
    * There's no way to specify a unique style (rather than the simple alternating styles) for a dataTable row.
    * JSF beans aren't available to the JSTL expression language unless you go through ugly hacks (such as outputting a JSF bean method to a dummy JSTL variable) to make sure the JSF backing beans get instantiated.
    * If any non-JSF stuff (including JSTL, HTML, verbatim character data, or whatever) is present in a JSF page, one has to tediously make sure that a special, seemingly-arbitrary hierarchy of subviews are in place---and even then it's not clear if you're following the spec or just managed to randomly find a combination that worked. Otherwise, all the information gets rendered out of order and out of hierarchy.
    * Don't even think about getting JSTL iteration elements to work with any of this.
    * commandLink still doesn't work in JSF 1.1_01.
    I'd go on, but I need to go back to taking JSF out of the single page I've been working on for days.
    Thanks for listening,
    Garret

    * dataTable can't create <th> except in a header
    facet, and a header facet can't access data being
    iterated.I've no idea why the heck you think a header facet
    should be able to access data that's being iterated.
    That makes no sense to me at all. A header is
    explicltly and, to me at least, obviously not part
    of per-row iteration!Read both parts of that comment together---what I'm really wanting is to be able to get a <th>, and the only way to do that is with a header facet. Here's an example off the top of my head:
    <h1>Book Metadata</h1>
    <table>
    <tr><th>Author</th> <td>Jane Doe</td></tr>
    </table>
    Here the row header is from a list of arbitrary book metadata---we don't know ahead of time what metadata properties the book has. Maybe it has two authors. Maybe it has five creation dates.
    It seems as though your frustrations mostly boil
    down to:
    (1) You hate <h:dataTable>, and find it too limiting.
    Well, it's one of the first JSF element's I've tried (after commandLink, of course). Maybe all of the others work just fine and are powerful.
    (2) You're trying to mix JSTL and JSF, and are
    surprised this doesn't work.
    For #2, it's a known and much-documented thing, so I
    can't understand why you're surprised.
    However documented it is, I'm surprised that not only does JSF not offer equivalent functionality as JSTL, it removes the ability to use JSTL.
    Garret                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Digitizer malfunctions

    (I don't really have a problem; I'm just curious what's going on here). iPhone 4 (iOS 6.1.13), bought an aftermarket (all in one, wall tumor to device) charger. Charges phone properly. But, when plugged in, the digitizer goes wonky - touch one part o

  • Best practice for Java stand alone upgrade into maint org area?

    I have a Java standalone running EP 6.0 on SAP netweaver 04 at SP 20. I want to upgrade to SAP Netweaver 2004s.  I think the equivalent of SPS 20 of NW 04 in NW 2004s is SPS 11 (ie all the SCAs are named *11...). NW 2004s SPS 11 download requires use

  • Is there a way to stop colors flattening when encoding for the web and DVD

    Hi. I am in post prod on my first feature film, which has some great horror dream sequences, lit red and green in the Mario Bava tradition. They really do look stunning in the original footage, with highly saturated crisp colors (We had a really grea

  • What is advantage of excel over labview measurment file

    hi      i am doing some data acquision work in labview..i want to know that for data storage which  will be better   , microsoft excel or labview measurment file..       whats advantage &disadvantage of same

  • Is there anyway this can be done?

    I am building a po number form, is there anyway that I can put a command in that everytime it opens it puts a new po number in in consecutive order? I need to make it so that who ever opens it, it will auto generate that number thanks for whoever hel