New to JSF

i am new to JSF. can any body tell the flow structure in typical JSF application and tell me the differences between JSF and struts?

Hello Friend,
I am also new to JSF>
But somethings which might help you are:
JSF follows MVC (Model View Controller) framework
Model : Its the bean where we declare our classes
View : Its the JSF form which we display to user
Controller : Bean which connects Model and View
These are some links which you can use :
http://courses.coreservlets.com/Course-Materials/jsf.html
http://www.thearcmind.com/confluence/display/SHJFT/Getting+started+with+JSF,+Facelets,+Eclipse+WTP+and+Tomcat
http://www.exadel.com/tutorial/jsf/jsftags-guide.html
http://www.artima.com/chapters/book.jsp?num=59362

Similar Messages

  • New 2 JSF, Help me in configuring it

    Hey what all are the JAR's required for JSF?
    where can i find it.
    Does it has any site or link, where i can download?
    Thanks
    Praveen

    Hi,
    The EA4 Version of JSF is bundled in version 1.2 of the Java Web Services Developer Pack (JWSDP):
    http://java.sun.com/webservices/webservicespack.html
    If you want to separate the libs from the pack you will need following libs after you have installed Java Web Services Developer Pack:
    C:\jwsdp-1.2\jsf\lib
    (=essential jsf jar files)
    and probably
    C:\jwsdp-1.2\common\lib
    (=additional jar files needed)
    Greetings,
    Rene

  • I'm new to jsf VWP..i need code for searching

    Hi,
    i need code for search...
    just populate records from database using jsf VWP5.5.1
    how to bind in table.
    we enter name r value in textbox click button related records display to table.how write code in button.
    pls help me....

    Don't crosspost. Please proceed here: http://forum.java.sun.com/thread.jspa?threadID=5211369

  • Setting a new EJB + JSF development environment

    Dear friends,
    nowadays me and some friends are dealing with the task of define the a Java development environment for a big enterprise...
    After some discussion and also evaluating the available machinery (a Z/os mainframe, a DB2 database and some oter minor servers...) - we decided to use EJB + JSF/Servlets.
    The JSF 4.0/Servlets support web requests while the Mainframe bundle the business components (EJB 2.1).
    Is that correct?
    have you some advices about our first decisions ?
    the development tools will be also discussed but we are pending to Eclipse WTP and JBoss for local tests.. and also MAVEN and ANT to integrate all this bunch of technologies....
    do you have some tip about plugins or frameworks that could help us to design a confortable and productive office ?
    best regards,
    Felipe Ga�cho

    Hi Louis,
    Thanks for the swift reply and for the insight into how Jdeveloper initialisation operates. I have since added the "ojaudit -profilehelp" to the setup scripts so that the system folder is correctly initialised. However, it is still not helping with my problem :(
    The preferences.xml file is not getting created as part of the call. It creates quite a few other files, but not preferences.xml
    $ ojaudit -profilehelp
    Oracle JDeveloper Audit 11.1.1.4.0 (5923)
    Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
    ADE version extension, using view: noshea_mos_test_view
    Defined profiles:
    Code Assist Rules
    All Metrics
    Compile Rules
    All Rules
    Javadoc Rules
    Audit Rules
    $ pwd
    /system11.1.1.4.37.59.23
    $ cd o.jdeveloper
    $ ls
    1.6.0_18-rev.jdk Default.kdf Eclipse.kdf applications.xml
    Brief.kdf DefaultWorkspace Emacs.kdf audit
    Classic.kdf Default_macosx.kdf VisualCPP.kdf ide.properties
    $
    I tried copying in a pre-created file, but i still see the same exception as before.
    At the moment, i am doing pretty much what the other team are doing in the make file :
    export JDEV_USER_DIR ; $(T_WORK)/jdevshiphome/jdeveloper/jdev/bin/ojaudit -profilehelp
    $(CP) $(NDE_PRODUCT_ROOT)/setup/preferences.xml $$PREF_FILE
    $(CHMOD) +w $$PREF_FILE;\
    Do you know how they generated the preferences.xml that they pick up from the setup directory? Maybe this is where im going wrong.
    The steps I follow to generate mine are:
    - Install Jdeveloper
    - Open jdeveloper, and use my audit profile as default.
    - close jdeveloper.
    - Copy the generated preferences.xml into my setup scripts.
    Then as part of the installation process
    - Install jdeveloper (using a script).
    - Run ojaudit -profilehelp.
    - copy the preferences.xml file into the o.jdeveloper directory.
    - Start Jdeveloper.
    Do I need to make some changes to this preferences.xml to somehow make it more generic before it can be reused.
    Thanks,

  • Hi every on.......i am new to jsf.....i want to create a page like this ...

    header [static for all the page]
    |
    |
    Menu button |
    | this side only i want load all the page .....after
    link | clicking the link.....help me pls...
    |
    |
    |
    |
    |
    |
    |

    hi acca kuddy ! are you ready for the interview?

  • Not able to drag new data control to my jsf

    hi am not able to drag Queriable Attributes into the new query.jsf page and abl to Create it as a Query > ADF Query Panel.
    this is what i have done
    1.In the Application Navigator locate the adfc-config file under the Page Flows node in the ViewController project. Double-click it to open it in the editor. This is where you are going to define the application's navigation.
    2.Drag the DeptEmpPage.jsf file from the Application Navigator into the empty adfc-config diagram.
    3.From the Component Palette drag and drop a View component into the adf-config diagram, and rename it query. This represents the new JSF page that you are about to create.
    4.From the Component Palette select Control Flow Case and then click on the DeptEmpPage and drag a line to the query page.
    Name this line goQuery.
    5.From the Component Palette choose another Control Flow Case and then create an opposite flow from the query page to the DeptEmpPage. Name this flow back.
    6.Double-click the query view in the diagram to create the new page. In the Create JSF Page dialog accept the default Facelets radio button, and with the Quick Start Layout radio button selected, click Browse.
    7.In the Component Gallery, retain the default One Column category, type and layout, but check the Apply Themes checkbox in the Options pane.
    Click OK and OK again to create the page.
    8.To add the employees search functionality to the page, open the Data Controls accordion, and locate EmpDetails1. (If you do not see it click the Refresh button).
    am not able to Select All Queriable Attributes and drag it into the new query.jsf page. Create it as a Query > ADF Query Panel.
    Edited by: user603350 on 2011/12/06 3:34 PM
    Edited by: user603350 on 2011/12/06 3:39 PM

    ... and this solved the problem ?

  • New entrence in JSF

    Hi all i am new in JSF and i have some problem by using it.
    I have a problem in my project that after sign out from any account when user click the browser back button then he must go to the Login page.
    i can do it by using jsp/servlet by using response.sendRedirect("url");
    and in jsf by using page navigation.
    " But i want to use page navigation in prerender() function of page and want to navigate user to login page. "
    By using button action method i can do it but i want to do page navigation in prerender() method.
    please its urgent help me
    thanks alot please soon

    A Filter is perfectly suitable for that. Look around at this forum or Google for "LoginFilter", it will give suitable examples.

  • Application not working with JSF 1.2

    I am new to JSF. I am trying to create a sample application with JSF 1.2. I am using weblogic 10.0. I have followed the instructions give in the whitepaper to configure JSF 1.2.
    http://download.oracle.com/technology/products/weblogic/portal/weblogic-portal-jsf-whitepaper.pdf
    Deployment descriptor contains following content.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>AlfaInsPortalWebApp</display-name>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    <!--<description>
                   State saving method: "client" or "server" (= default)
                   See JSF Specification 2.5.2
              </description>-->
    </context-param>
    <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.jsf</welcome-file>
    <welcome-file>index.faces</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
         <session-config>
         <session-timeout>30</session-timeout>
         </session-config>
    </web-app>
    Weblogic.xml contains reference to following libraries
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
         <wls:container-descriptor>
              <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
         </wls:container-descriptor>
    <wls:context-root>AlfaInsPortalWebApp</wls:context-root>
    <wls:library-ref>
    <wls:library-name>jstl</wls:library-name>
    <wls:specification-version>1.2</wls:specification-version>
    <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-tools-visitor-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-tools-framework-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-commonui-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-framework-full-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-clipper-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-lookandfeel-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-rest-full-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-framework-rest-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-rest-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-light-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-wsrp-producer-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-framework-common-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-framework-struts-1.2-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>struts-1.2</wls:library-name>
    <wls:specification-version>1.2</wls:specification-version>
    <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>wlp-services-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>content-management-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>beehive-netui-1.0.1-10.0</wls:library-name>
    <wls:specification-version>1.0</wls:specification-version>
    <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>beehive-netui-resources-1.0.1-10.0</wls:library-name>
    <wls:specification-version>1.0</wls:specification-version>
    <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>p13n-web-lib</wls:library-name>
    <wls:specification-version>10.2.0</wls:specification-version>
    <wls:implementation-version>10.2.0</wls:implementation-version>
    </wls:library-ref>
    <wls:library-ref>
    <wls:library-name>jsf</wls:library-name>
    <wls:specification-version>1.2</wls:specification-version>
    <wls:implementation-version>1.2.3.1</wls:implementation-version>
    </wls:library-ref>
    </wls:weblogic-web-app>
    When i start the application server following logs were obtained
    Apr 9, 2010 7:09:32 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/SampleJSF'
    Apr 9, 2010 7:09:33 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/SampleJSF'
    Apr 9, 2010 7:09:33 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/SampleJSF'
    Apr 9, 2010 7:09:33 AM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for context '/SampleJSF'
    When i invoke the application I get the following error.
    java.lang.NoSuchMethodError: initView
         at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:92)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Please help me in configuring JSF 1.2.

    If you are new to JSF, then I'd try and simplify the environment in which you are working as the first step to achieving a successful outcome.
    JSF 1.2 is a certified and well tested component of WLS, so we know it works. I'm not sure of the effect of all those additional modules you are adding in there -- it appears as if you have gotten a Faces implementation instantiated, but there could be some form of version difference/conflict since it can't find a method its looking for.
    Using Oracle Enterprise Pack for Eclipse (http://www.oracle.com/technology/software/products/oepe/oepe_11115.html) you can build yourself out a pretty simple JSF application to get started from and deploy it to a WLS server. This would remove all the additional libraries you currently have, provide you with a bundled applicaton to deploy and give you a pretty good environment from which you can learn and experiment with JSF.
    -steve-

  • JSF sample application in WLP 10.3.2

    Hi All,
    I am new to JSF and trying to build a sample application in WLP 10.3.2.
    I created a jsp with simple form and submit. Created a JSF portlet with that JSP. When I try to deploy and run the portlet, I get this error on the console.
    +<Aug 15, 2010 6:53:10 PM PDT> <Warning> <netuix> <BEA-423319> <A default JSP response character encoding was not found for webapp [TestJSFwar]. Defaulting to [UTF-8]. You can over+
    ride this default response character encoding for all portals in netuix-config.xml or for each portal or desktop in each portal or desktop definition.>
    Aug 15, 2010 6:53:40 PM com.sun.faces.lifecycle.Phase doPhase
    +SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /TestJSF.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.Lifecycle+
    Impl@15563f5]
    +<Aug 15, 2010 6:53:40 PM PDT> <Error> <ServletContext-/TestJSFwar> <BEA-000000> <Exception thrown in doFacesRequest:render+
    javax.faces.FacesException: java.lang.ClassCastException: com.bea.portlet.container.RenderRequestImpl cannot be cast to javax.servlet.ServletRequest
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRender(BridgeImpl.java:906)
    at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:769)
    at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:645)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassCastException: com.bea.portlet.container.RenderRequestImpl cannot be cast to javax.servlet.ServletRequest
    at com.bea.portlet.adapter.faces.ScopedIdSupport.getScopeKey(ScopedIdSupport.java:74)
    at com.bea.portlet.adapter.faces.taglib.naming.internal.NamingContainerTagImpl.doStartTag(NamingContainerTagImpl.java:200)
    at com.bea.portlet.adapter.faces.taglib.naming.NamingContainerTag.doStartTag(NamingContainerTag.java:101)
    at jsp_servlet.__testjsf._jsp__tag1(__testjsf.java:161)
    at jsp_servlet.__testjsf._jsp__tag0(__testjsf.java:123)
    Truncated. see log file for complete stacktrace
    and on the browser I get a stack trace
    javax.portlet.faces.BridgeException: javax.faces.FacesException: java.lang.ClassCastException: com.bea.portlet.container.RenderRequestImpl cannot be cast to javax.servlet.ServletRequest
    javax.portlet.PortletException: doBridgeDispatch failed:  error from Bridge in executing the request
    at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:648)
    at javax.portlet.faces.GenericFacesPortlet.doRenderDispatchInternal(GenericFacesPortlet.java:611)
    at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:255)
    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
    at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:226)
    at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
    at com.bea.portlet.container.PortletStub.doRender(PortletStub.java:942)
    at com.bea.portlet.container.FilterChainGenerator.runFilterChain(FilterChainGenerator.java:124)
    at com.bea.portlet.container.PortletStub.render(PortletStub.java:414)
    at com.bea.portlet.container.AppContainer.renderStub(AppContainer.java:1120)
    at com.bea.portlet.container.AppContainer.invokeRender(AppContainer.java:1052)
    at com.bea.netuix.servlets.controls.content.JavaPortletContent.fireRender(JavaPortletContent.java:267)
    I think that WLP 10.3.2 by default supports the JSF. Do I need to add anything else to the project facets ?
    Please help !!!
    Thanks.
    Win

    Hello Venkat,
    I have removed that tag but still getting errors. This is the stack trace of my error. Please have a look at it and let me know if you can find something out of it.
    SEVERE: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
    javax.faces.el.EvaluationException: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:319)
         at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:659)
         at javax.portlet.faces.GenericFacesPortlet.doActionDispatchInternal(GenericFacesPortlet.java:594)
         at javax.portlet.faces.GenericFacesPortlet.processAction(GenericFacesPortlet.java:262)
         at com.bea.portlet.container.PortletStub.doAction(PortletStub.java:899)
         at com.bea.portlet.container.FilterChainGenerator.runFilterChain(FilterChainGenerator.java:96)
         at com.bea.portlet.container.PortletStub.processAction(PortletStub.java:314)
         at com.bea.portlet.container.AppContainer.invokeProcessAction(AppContainer.java:678)
         at com.bea.netuix.servlets.controls.content.JavaPortletContent.fireProcessAction(JavaPortletContent.java:209)
         at com.bea.netuix.servlets.controls.portlet.JavaPortlet.fireProcessAction(JavaPortlet.java:1295)
         at com.bea.netuix.servlets.controls.portlet.JavaPortlet.raiseChangeEvents(JavaPortlet.java:801)
         at com.bea.netuix.nf.ControlLifecycle$4.postVisitRoot(ControlLifecycle.java:316)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:341)
         at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
         at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
         at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
         at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)
         at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291)
         at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:219)
         at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275)
         at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:719)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at com.JSFPortletHelper.getRequest(JSFPortletHelper.java:32)
         at com.JSFPortletHelper.authenticate(JSFPortletHelper.java:199)
         at com.JSFLoginPortletRequestBean.authenticate(JSFLoginPortletRequestBean.java:33)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
         ... 51 more
    Aug 30, 2010 1:39:41 PM com.sun.faces.lifecycle.InvokeApplicationPhase execute
    WARNING: #{JSFLoginPortletRequestBean.authenticate}: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
    javax.faces.FacesException: #{JSFLoginPortletRequestBean.authenticate}: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:319)
         at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:659)
         at javax.portlet.faces.GenericFacesPortlet.doActionDispatchInternal(GenericFacesPortlet.java:594)
         at javax.portlet.faces.GenericFacesPortlet.processAction(GenericFacesPortlet.java:262)
         at com.bea.portlet.container.PortletStub.doAction(PortletStub.java:899)
         at com.bea.portlet.container.FilterChainGenerator.runFilterChain(FilterChainGenerator.java:96)
         at com.bea.portlet.container.PortletStub.processAction(PortletStub.java:314)
         at com.bea.portlet.container.AppContainer.invokeProcessAction(AppContainer.java:678)
         at com.bea.netuix.servlets.controls.content.JavaPortletContent.fireProcessAction(JavaPortletContent.java:209)
         at com.bea.netuix.servlets.controls.portlet.JavaPortlet.fireProcessAction(JavaPortlet.java:1295)
         at com.bea.netuix.servlets.controls.portlet.JavaPortlet.raiseChangeEvents(JavaPortlet.java:801)
         at com.bea.netuix.nf.ControlLifecycle$4.postVisitRoot(ControlLifecycle.java:316)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:341)
         at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
         at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
         at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
         at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)
         at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291)
         at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:219)
         at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275)
         at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:719)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.bea.content.manager.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:178)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         ... 50 more
    Caused by: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at com.JSFPortletHelper.getRequest(JSFPortletHelper.java:32)
         at com.JSFPortletHelper.authenticate(JSFPortletHelper.java:199)
         at com.JSFLoginPortletRequestBean.authenticate(JSFLoginPortletRequestBean.java:33)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
         ... 51 more
    Aug 30, 2010 1:39:41 PM com.sun.faces.lifecycle.Phase doPhase
    SEVERE: JSF1054: (Phase ID: INVOKE_APPLICATION 5, View ID: /portlets/loginportlet/LoginPortlet.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@11bdace]
    <Aug 30, 2010 1:39:41 PM UZT> <Error> <ServletContext-/TestPortalWebProject> <BEA-000000> <Exception thrown in doFacesRequest:action
    javax.faces.FacesException: #{JSFLoginPortletRequestBean.authenticate}: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:90)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:319)
         at javax.portlet.faces.GenericFacesPortlet.doBridgeDispatch(GenericFacesPortlet.java:659)
         Truncated. see log file for complete stacktrace
    Caused By: javax.faces.FacesException: #{JSFLoginPortletRequestBean.authenticate}: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
         Truncated. see log file for complete stacktrace
    Caused By: javax.faces.el.EvaluationException: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
         at com.JSFPortletHelper.getRequest(JSFPortletHelper.java:32)
         at com.JSFPortletHelper.authenticate(JSFPortletHelper.java:199)
         at com.JSFLoginPortletRequestBean.authenticate(JSFLoginPortletRequestBean.java:33)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         Truncated. see log file for complete stacktrace
    >
    Thanks for your rapid response.
    *(' ')sman*

  • How to click on h:datatable and open a new page

    Hi,
    I'm new to JSF. I have a basic example with JSF h:datatable which displays data. When I click on the table row new page is opened and an argument s passed via the http header:
    Datatable:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core">
        <head>
            <title>test</title>
            <script type="text/javascript">
                function addOnclickToDatatableRows() {
                    //gets all the generated rows in the html table
                    var trs = document.getElementById('myForm:dataTable').getElementsByTagName('tbody')[0]
                    .getElementsByTagName('tr');
                    //on every row, add onclick function (this is what you're looking for)
                    for (var i = 0; trs.length > i; i++) {
                        trs.onclick = new Function("rowOnclick(this)");
    function rowOnclick(tr) {
    // var childNodes = tr.childNodes;
    // for(var i = 0; childNodes.length > i; i++) {
    var elements = tr.cells[0].childNodes;
    for(var i = 0; elements.length > i; i++) {
    if ((typeof elements[i].id !== "undefined") &amp;&amp;
    (elements[i].id.indexOf("lnkHidden") > -1)) {
    //opne in a new window// window.open(elements[i].href);
    location.href=elements[i].href
    break;
    return false;
    </script>
    </head>
    <body onload="addOnclickToDatatableRows();">
    <h:form id="myForm">
    <h1>Click on table row example</h1>
    <h:dataTable id="dataTable" var="data" value="#{datatableBean.lstData}" border="1">
    <h:column>
    <f:facet name="header">
    <h:outputText value="ID" />
    </f:facet>
    <h:outputText value="#{data.id}" />
    <h:outputLink id="lnkHidden" value="AnotherPage.xhtml"
    style="display:none">
    <f:param name="id" value="#{data.id}" />
    </h:outputLink>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Value1" />
    </f:facet>
    <h:outputText value="#{data.value}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Value2" />
    </f:facet>
    <h:outputText value="#{data.value}" />
    </h:column>
    </h:dataTable>
    </h:form>
    </body>
    </html>
    Managed bean:package edu.home;
    import edu.home.model.Data;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.ViewScoped;
    @ManagedBean
    @ViewScoped
    public class DatatableBean {
    private List<Data> lstData;
    * Creates a new instance of datatableBean
    public DatatableBean() {
    lstData = new ArrayList<Data>();
    lstData.add(new Data(1, "Hello World"));
    lstData.add(new Data(2, "Hello 123"));
    lstData.add(new Data(3, "Hello abv"));
    lstData.add(new Data(4, "Hello qaz"));
    * @return the lstData
    public List<Data> getLstData() {
    return lstData;
    * @param lstData the lstData to set
    public void setLstData(List<Data> lstData) {
    this.lstData = lstData;
    The Java object:package edu.home.model;
    public class Data {
    private int id;
    private String value;
    public Data(int id, String value) {
    this.id = id;
    this.value = value;
    * @return the id
    public int getId() {
    return id;
    * @param id the id to set
    public void setId(int id) {
    this.id = id;
    * @return the value
    public String getValue() {
    return value;
    * @param value the value to set
    public void setValue(String value) {
    this.value = value;
    The page which is opened after the row is clicked:<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html">
    <head>
    <title>TODO supply a title</title>
    </head>
    <body>
    <h1>This is another page</h1>
    <h:panelGrid columns="2">
    <h:outputText value="Selected ID" />
    <h:outputText value="#{anotherPageBean.id}" />
    </h:panelGrid>
    </body>
    </html>
    The managed bean of the opened page:package edu.home;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.RequestScoped;
    import javax.faces.context.FacesContext;
    @ManagedBean
    @RequestScoped
    public class AnotherPageBean {
    private int id;
    * Creates a new instance of AnotherPageBean
    public AnotherPageBean() {
    try {
    this.id = Integer.parseInt((String)FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("id"));
    catch (Exception e) {
    this.id = 0;
    * @return the id
    public int getId() {
    return id;
    * @param id the id to set
    public void setId(int id) {
    this.id = id;
    My question is how I can pass the argument into the background, without using the http header? Can you help me to implement this example?
    Best Wishes
    Peter
    Edited by: 932633 on May 7, 2012 3:18 PM
    Edited by: 932633 on May 7, 2012 3:18 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    EJP wrote:
    And why all the futzing around in Javascript? Why not just use &lt;a&gt; or <h:outputLink> in the normal way? What value are you trying to add here?
    I'm new to JSF.OP answered that already. I guess the OP really wants to turn a table row into something clickable, a link won't suffice then. Basic JSF tags don't support tagging event handlers to individual rows/columns as far as I know.
    @OP: you should really check out extension frameworks like Primefaces which have more advanced datatable implementations. Check out this for example:
    http://www.primefaces.org/showcase/ui/datatableRowSelectionInstant.jsf
    There is also Richfaces, Icefaces, Tomahawk. Probably using any of these extension frameworks you hardly ever have to write manual javascript.

  • Creating new JSF2 pages from a running Servlet (3.0) or JSF2 page?

    I'm new to JEE6 web apps with JSF 2.x frontends (GlassFish 3), and I still wasn't able to find a solution for this dynamic JSF 2.x problem:
    *From inside a running JSF 2.x web app (Servlet 3.0), which possibilities (if any) do I have to dynamically add generated JSF pages (whole new .xhtml files) to specific folders of the (exploded) document root, so that these pages can be dispatched to the client like any traditional, statically-deployed one?*
    Background: An app for "promoting" authors/editors (content providers) which has these few main requirements:
    <ol>
    <li>New providers will register under <tt>www.acme.com/app/register.xhtml</tt>.</li>
    <li>The system will grant each provider "sub-domain" associated with web space under
    <tt>www.acme.com/app/<b>providerX</b></tt> where providerX is an arbitrary sub-domain name chosen by the provider during the registration.</li>
    <li>Each provider will initially have some pre-defined pages in their document context root, e.g.
    <tt>www.acme.com/app/providerX/index.xhtml</tt>, <tt>about-me.xhtml</tt>, <tt>contact.xhtml</tt>, etc.</li>
    <li>Each provider will have an administration console for managing 2 tasks:
    <ul>
    <li type="a"><tt>www.acme.com/app/providerX/admin/page-manager.xhtml</tt> </li>
    <li type="a"><tt>www.acme.com/app/providerX/admin/customer-manager.xhtml</tt></li>
    </ul>
    to specify new pages with offers, publish these pages in their document context root, e.g. <tt>www.acme.com/app/<b>providerX</b>/<b>my-services</b>.xhtml</tt> (customized page name), and
    to manage their readers/customers, respectively.
    </li>
    <li>Thus, each providerX will also have a pre-deployed customer registration page running, which creates standard customer accounts. E.g.:
    <ul>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/registration.xhtml</tt></li>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/login.xhtml</tt></li>
    <li type="disc"><tt>www.acme.com/app/providerX/customers/customer-account-dashboard.xhtml</tt></li>
    </ul>
    </li></ol>
    Please note: I know that for such kind of systems a CMS would be more suitable, but is such a system -- here aiming at only basic functionality -- also realizable in pure JEE 6 technologies, i.e. w/o CMS???
    <b>The unclear main aspect is stated in my initial question above. Basically, I hope to get these clarifications:</b>
    <ol>
    <li><b>Which app architecture designs can I use to deploy new generated JSF pages or servlets from within a running JSF page or servlet???</b></li>
    <li><b>Supposing that all relevant page description data provided by a provider is stored in a db:
    Where can I "cache" the new .xhtml pages generated from these data on-the-fly when (a) an exploded WAR, and (b) a packaged WAR is running???</b>
    The pages shall be "hooked" to the scope (doc root) of the respective provider and dispatches by the <tt>FacesServlet</tt> as such.</li>
    </ol>
    Due to the crucial importance in a current project, I'd really appreciate any constructive help very much.
    Natalia.

    Natalia F. wrote:
    Determining you as one of the experts in this forum, please, could I ask you how you'd solve this kind of web apps in JSF2 (one of the requirements stated at the beginning of this thread):I'm certainly an expert at having an opinion about everything.
    >
    Having a "page-manager.xhtml" JSF2 UI at "/page-manager" context that lets registered member X define a website (=a set of .jsf/.xhtml pages) in a new context "/websiteX" (where "websiteX" is freely chosen and associated with dedicated webspace to store the pages in the filesystem):
    How to store these dynamically created website pages from within the PageManagerServlet?
    <ol><li type="a">Could I create a new exploded WAR structure in the filesystem (or elsewhere) when a new context is defined, and then store new .jsf/.xhtml files therein when a new page is defined, all this with usual file operations? -- Would this be enough, or...</li>
    <li type="a">...after storing a new page, would I need to explicitly tell the container to deploy the page (or re-deploy the WAR(?)) so that I can instantly test/run the page when it is new/modified, or will it be compiled automatically when pointing a browser to it???
    I guess both is possible, but for performance reasons, a pre-compile would be better. How can I achieve this?</li>
    </ol>
    Thank you a million for your help, Natalia.I only see mention of xhtml files - that is the easy part. But XHTML files don't actually do anything at all. What about classes like JSF managed beans? jar libraries? database connections and ORM/JPA support which also adds the complexity of having to deal with all the configuration descriptor files? Even if you can automatically deploy all that, replacing existing classes and reloading them is a whole different matter.
    My "expert" opinion: this cannot be done with JSF. In fact the only Java web framework which I can think of that has any chance of making something like this possible is Play framework. I'd really take the road that EJP took: make the content dynamic, not the webapp.

  • JSF Samples (jsf-guessNumber.war)is NOT Working in Tomcat

    Hello
    I have worked in struts a bit, but, I'm new to JSF world. I was trying to run small program in JSF, but, I am getting the error by all the way.
    I have downloaded the JSF from Sun web site, the version says, jsf1.1 Final. I have found, "jsf-guessNumber.war" file in the sample folder in the downloaded zip file. I have already working Tomcat 5.5 in my laptop, I have deployed jsf-guessNumber.war application in my Tomcat and deployed successfully. But, when try to access the application through http://localhost:8080/jsf-guessNumber/ , the below exception appears. I have changed nothing in the war file. I have tried to deploy all other war sample files in my tomcat, but, nothing is working :-(.
    Can anyone please help me to find out what's wrong with this ?. Many Thanks in advance!.
    The exception details are below
    Dec 13, 2007 12:18:54 AM org.apache.catalina.core.ApplicationContext log
    SEVERE: StandardWrapper.Throwable
    java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:660)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:691)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:661)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:97)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:595)
    Dec 13, 2007 12:18:54 AM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Allocate exception for servlet Faces Servlet
    java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:660)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:691)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:661)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:97)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:595)
    Dec 13, 2007 12:18:54 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:660)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:691)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:661)
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:97)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:595)
    Thanks
    Sarav.

    Hi BalusC
    I have downloaded this now - https://javaserverfaces.dev.java.net/files/documents/1866/78307/jsf-1_2_07.zip and deployed samples in my Tomcat and added the libs. Restarted ny tomcat too thrice.
    I am getting the below exception while accessing this http://localhost:8080/jsf-guessNumber/
    Dec 13, 2007 12:53:12 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
         at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267)
         at javax.faces.webapp.FacesServlet.init(FacesServlet.java:164)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:660)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:691)
    Can you please help to find out what is missing ?

  • JSF-Data Table displaying all data in a single row

    Hi Guys,
    Im new to JSF, im trying to display the details from a List in a data table, but all the details are getting displayed in a single cell instead of displaying as rows, can someone help me with this problem?

    You need post your code so that we can view it.
    This is an example of dataTable
    <h:dataTable border="1" id="qresults" cellpadding="4" styleClass="subjectQRTbl" cellspacing="4" value="#{wormingList.worming}" var="bbr" first="#{wormingList.firstRowIndex}" rows="#{wormingList.noOfRows}" rowClasses="evenRow,oddRow">
    <h:column>
    <f:facet name="header">
         <h:outputText escape="false" value="Vaccination Date" />
    </f:facet>
    <h:commandLink id="locnum" action="#{appAction.getWormingRecord}" title="Update Worming History Record">
    <h:outputText value="#{bbr.dateWormed}">
    <f:convertDateTime pattern="MM/dd/yyyy"/>
    </h:outputText>
    <f:param name = "recordId" value ="#{bbr.id}" />
    </h:commandLink>
    </h:column>
    <h:column>
    <f:facet name="header" >
    <h:outputText escape="false" value="Vaccination Type" />
    </f:facet>
    <h:outputText value="#{bbr.type}" styleClass="readOnly" />
    </h:column>
    <h:column>
    <f:facet name="header" >
    <h:outputText value="Vaccination Dosage" />
    </f:facet>
    <h:outputText value="#{bbr.dosage}"styleClass="readOnly"/>
    </h:column>
    </h:dataTable>
    Hope this helps

  • Generating pop up using JSF

    Hi floks,
    i`m new to JSF world plese help me out in generating a pop up window in the page.
    Here is my requirement i will be having a list of links in my master page(parent) on click of each link i need to show a pop up which contains some details ,which i need to get from DB in the pop up mbean . i will have few buttons in my pop up and for each and every action i will be having a DB operation accordingly.I have tried out different ways and i failed.
    The problem that im facing is when pop up loading for the first time its well and good and projecting the values as expected.But for the second time it showing the new values in the init funtion and i cant see teh new values on the screen insted its showing the first pop up values.
    :confused:
    please help me....
    Thanks in anticipation
    Thanks & Regards,
    Shivaji Byrapaneni.

    Hi Shivaji!
    Try to read this:
    http://forums.sun.com/thread.jspa?threadID=5098612&messageID=9339259
    I hope it will help You.
    Thanks,
    Roman.

  • How to get another jsp by clicking a h:commandLink in jsf page

    Hi,
    I am new to JSF. pls send sample code me how to get another jsp by clicking a commandLink in jsf.
    SUB: TO go to the page "report7.jsp"
    -->By getting help from samples i wrote for above in 2 ways.
    1)
    <td><h:commandLink id="RO0007" action="r7" >Sharing of Information from Foreign FIU</h:commandLink></td>
    and in <reports-config>
    <navigation-case>
    <from-outcome>r7</from-outcome>
    <to-view-id>report7.jsp</to-view-id>
    </navigation-case>
    2) Sending request through bean method
    <td><h:commandLink id="RO0007" action="#{RBean.report7()}" >Sharing of Information from Foreign FIU</h:commandLink></td>
    in RBean the method form is
    public String report7(){          
         return "r7";
    and in <reports-config>
    <navigation-case>
    <from-outcome>r7</from-outcome>
    <to-view-id>report7.jsp</to-view-id>
    </navigation-case>
    Some problem in both i think as it is not going to next page. i need to go to th next page by calling Bean Method.
    please get me out of this problem. It is very urgent. Thank you.
    **************************************************************

    What error is it throwing? If it is throwing a Page not found, then maybe you should try mapping to "report7.faces" instead of "report7.jsp"
    Can you post your faces-config please

Maybe you are looking for

  • How can I save a reply email to drafts folder when using hotmail on my ipad2 with safari ??

    It appears that the iPad mail app cannot push drafts so I can access them on a pc.     If there is a way to do this, I would like to know If the above is not possible, I'd like to know how to save a reply email to the drafts folder when accessing hot

  • Change font color in the Text Field of a Popup Key LOV

    Hello, I have a question concerning Popup Key LOV. I want to change the font color in the Text Field of the Popup Key LOV Item. I searched the forum but I cannot find an answer about this! Although I searched the CSS and the Popup Key LOV Template, b

  • Converting data volume type from LINK to FILE on a Linux OS

    Dear experts, I am currently running MaxDB 7.7.04.29 on Red Hat Linux 5.1.  The file types for the data volumes were initially configured as type LINK and correspondingly made links at the OS level via "ln -s" command.  Now (at the OS level) we have

  • Boot Camp 4

    Hi i have boot camp 4.0.4 on my mac, should i install the lastest 4.0.4 to install windows 7 or just use what i have on my mac already?

  • Would like project entry on Recurring JEs and Posting Templates

    From our customer: Version:  SAP 2007A PL 49 Description of requirements: (When setting up recurring entries and Posting Templates there is no place to enter the project code.  There is a field to enter the distribution code.  For some monthly recurr