JSF Controller

I have been reading about jsf and I need a good way to call business logic/service code on user input. There are sample jsf apps on the web that use a managed bean's action method to invoke the call to business logic code. Is it good to use the the managed bean's action method to call business logic/service code to handle processing? Is there a better design pattern that I could adopt. I know that facesservlet is the controller for a jsf application. Can I use this somehow in my web app to handle calling business logic code?

hello_world wrote:
Are you suggesting adopting a design that is similar to this http://www.vogella.de/articles/JavaServerFaces/ar01s06.html?
Honestly, I don't see any difference from "standard JSF approach".
Aren't you (and the article) confusing "controller" with "model" ?

Similar Messages

  • SessionContext in JSF Controller class

    Hello,
    I want to access a EJB session bean from a JSF managed bean. I wrote this code for the JSF managed bean:
    public class MyController {
    @Resource
    private SessionContext sc;
    Unfortunately, the SessionContext is always null, when I deploy this to Glassfish. How should this be done?
    Many thanks in advance,
    Ulrich

    I know this thread is old, but I'm having the same problem. Actually, I get an error when the container attempts to inject the SessionContext. Is this possible? I need to do this because I have to include a class in the current JTA
    pService = sessionCTX.getBusinessObject(MyClass.class);Here is the error:
    JSF1001: Managedbean DPRAdminController could not be created.
    executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@75b962) threw exception
    javax.faces.FacesException: javax.faces.FacesException: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1553)
            at com.sun.faces.renderkit.RenderKitUtils.renderXHTMLStyleBooleanAttributes(RenderKitUtils.java:530)
            at com.sun.faces.renderkit.RenderKitUtils.renderXHTMLStyleBooleanAttributes(RenderKitUtils.java:492)
            at com.sun.faces.renderkit.html_basic.ButtonRenderer.encodeBegin(ButtonRenderer.java:177)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
            at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
            at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: javax.faces.FacesException: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:519)
            at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
            at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
            at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
            at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
            at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
            at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
            at javax.faces.component.html.HtmlCommandButton.isDisabled(HtmlCommandButton.java:161)
            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 javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1545)
            ... 47 more
    Caused by: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:340)
            at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:509)
            ... 59 more
    Caused by: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:387)
            at com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:206)
            at com.sun.enterprise.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:127)
            at com.sun.faces.vendor.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:79)
            at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:298)
            ... 60 more
    Caused by: javax.naming.NameNotFoundException: No object bound for java:comp/env/com.mypack.dpr.jsf.DPRAdminController/sessionCTX [Root exception is java.lang.IllegalStateException: Illegal invocation type for EJB Context : 0]
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:337)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:287)
            ... 64 more
    Caused by: java.lang.IllegalStateException: Illegal invocation type for EJB Context : 0
            at com.sun.ejb.containers.ContainerFactoryImpl.getEJBContextObject(ContainerFactoryImpl.java:836)
            at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:965)
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
            ... 67 more
    StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
    javax.faces.FacesException: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:519)
            at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
            at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
            at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
            at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
            at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
            at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
            at javax.faces.component.html.HtmlCommandButton.isDisabled(HtmlCommandButton.java:161)
            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 javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:1545)
            at com.sun.faces.renderkit.RenderKitUtils.renderXHTMLStyleBooleanAttributes(RenderKitUtils.java:530)
            at com.sun.faces.renderkit.RenderKitUtils.renderXHTMLStyleBooleanAttributes(RenderKitUtils.java:492)
            at com.sun.faces.renderkit.html_basic.ButtonRenderer.encodeBegin(ButtonRenderer.java:177)
            at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
            at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
            at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
            at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
            at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
            at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
            at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: javax.faces.FacesException: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:340)
            at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:509)
            ... 59 more
    Caused by: com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: com.mypack.dpr.jsf.DPRAdminController/sessionCTX@Field-Injectable Resource. Class name = com.mypack.dpr.jsf.DPRAdminController Field [email protected]@com.mypack.dpr.jsf.DPRAdminController/sessionCTX@@ into class com.mypack.dpr.jsf.DPRAdminController
            at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:387)
            at com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:206)
            at com.sun.enterprise.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:127)
            at com.sun.faces.vendor.GlassFishInjectionProvider.inject(GlassFishInjectionProvider.java:79)
            at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:298)
            ... 60 more
    Caused by: javax.naming.NameNotFoundException: No object bound for java:comp/env/com.mypack.dpr.jsf.DPRAdminController/sessionCTX [Root exception is java.lang.IllegalStateException: Illegal invocation type for EJB Context : 0]
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:337)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:287)
            ... 64 more
    Caused by: java.lang.IllegalStateException: Illegal invocation type for EJB Context : 0
            at com.sun.ejb.containers.ContainerFactoryImpl.getEJBContextObject(ContainerFactoryImpl.java:836)
            at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:965)
            at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
            ... 67 more

  • Invoking a WLI 9.2 business process from JSF Controller class

    I want to call a WLI business process from a java class, which will run in the same JVM as the WLI. I have read that JPD Proxy can be used for this purpose. I am concerned with the overhead of RMI calls. Any insight into this would be helpful .

    Hi Raj
    You have to use JPDproxy to call a business process from a java class. This is what BEA also recommends at http://e-docs.bea.com/workshop/docs81/doc/en/integration/howdoI/howProxyJavaClient.html as this is the only way to call a JPD from plain java class.
    Many customers use this and even if there is, the overhead should not be substantial.
    You may also want to try posting in the WLI newsgroup at http://forums.bea.com/bea/forum.jspa?forumID=2047
    Vimala-

  • JSF Components are not being rendered - Websphere

    First, I don't mean rendered as in rendered="true'' What I mean is that a page I've created doesn't show any of the components rendered. Even while looking at the source, the HTML is not generated.
    Example: test.jsp
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib prefix="af" uri="http://xmlns.oracle.com/adf/faces" %>
    <%@ taglib prefix="afh" uri="http://xmlns.oracle.com/adf/faces/html" %>
    <%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
    <f:view>     
         <afh:html>
         <afh:head title="CIAS Case Management"/>
         <afh:body >
         <h:form id="createRfiForm">      
         <h:commandButton id="button" action="#{summaryRfiAction.promptCreateNewRfi}" value="Create New RFI"/>     
    </h:form>
         </afh:body>
         </afh:html>
    </f:view>
    When viewed the page is blank. The url I goto is :9080/cias/secure/test.do
    However if I put "Hello World" anywhere (I put it under the af:outputText) it will show up, so I know that the faces-config-nav is working correctly (it maps the .do to .jsp in terms of the file). What I don't think is working correctly is the invocation of the FacesServlet. In web.xml I have this defined.
    <servlet>
              <description>JSF controller</description>
         <servlet-name>FacesServlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- Requests handled by JSF -->     
         <servlet-mapping>
              <servlet-name>FacesServlet</servlet-name>
         <url-pattern>*.do</url-pattern>
         </servlet-mapping>
    Anyone with any thoughts? This works in tomcat (yay apache), but doesn't work when I use Websphere.

    Hi,
    I've the same problem using WepSphere AppServer V6.1.0.5 on Linux.
    Are there some solutions/ideas solving this problem?
    The Application runs on Tomcat, JBoss, Glassfish but not on WAS.
    SystemOut.log shows only this:
    [16.02.07 15:31:02:185 CET] 00000028 ServletWrappe I SRVE0242I: [application] [application] [index.jsp]: Initialisierung erfolgreich.
    [16.02.07 15:31:02:998 CET] 00000028 ServletWrappe I SRVE0242I: [application] [application] [login.jsp]: Initialisierung erfolgreich.
    index.jsp redirects to login.jsp.
    tia,
    Andreas

  • Announcing: Developing JSF Portlets with WebLogic Portal Whitepaper

    Just Released: Developing JSF Portlets with WebLogic Portal Whitepaper
    A supplemental developer's guide has been published to help guide WLP 10.x customers that wish to use JSF as the web framework for building portlets on WebLogic Portal. This is a sizable document (150 pages) that covers a large number of topics. It also coaches developers on best practices and common pitfalls.
    Important: It also clarifies the supported configuration of JSF within Portal Web Projects. Workshop for WebLogic by default configures a web project in a configuration that is not supported by WebLogic Portal. The guide explains how to address this:
    * Change from the unsupported MyFaces JSF implementation to the supported Sun Reference Implementation (RI)
    * Change from the unsupported "client" STATE_SAVING_METHOD to the supported "server"
    The guide can be downloaded here:
    http://download.oracle.com/technology/products/weblogic/portal/weblogic-portal-jsf-whitepaper.pdf
    To help internet searches locate this document, the table of contents is reproduced below:
    Introduction
    1.1. Prerequisites...................................................................... 8
    1.2. Applicable Versions............................................................ 8
    1.3. Native Portlet Bridges and Standard Portlet Bridges .......... 8
    1.4. JSF Portlet Support Roadmap ........................................... 9
    1.5. Whitepaper Structure ....................................................... 10
    1.6. Look Before You Leap ..................................................... 10
    1.7. For More Information........................................................ 10
    Part 1: Converting JSF Applications into Portlets
    2. IDE Support for JSF Portlets Chapter ...................................... 12
    2.1. Workshop for WebLogic – WebLogic Portal's Supported IDE 12
    2.2. Workshop Features for JSF Support in WebLogic Portal.. 12
    3. Introduction to JSF Portlets Chapter ........................................ 18
    3.1. Creating Your First JSF Portlet......................................... 18
    3.2. Essentials of JSF Portlet Views........................................ 21
    3.3. WebLogic Portal Artifacts................................................. 22
    4. Configuring JSF within WebLogic Portal Chapter..................... 24
    4.1. JSF Library Modules in WebLogic Server ........................ 24
    4.2. Installing the JSF Libraries into a Portal Web Project ....... 25
    4.3. JSF Configuration Settings............................................... 27
    4.4. Configuring JSF 1.2 ......................................................... 29
    4.5. Building an Unsupported JSF Implementation Library Module 31
    4.6. Faces Configuration is Web Application Scoped.............. 31
    5. Navigation within a JSF Portlet Chapter................................... 33
    5.1. Navigating within a Portlet with the JSF Controller ........... 33
    5.2. Redirects.......................................................................... 34
    6. Namespacing Chapter ............................................................. 35
    6.1. Namespacing Managed Bean Names.............................. 35
    6.2. Client ID Namespacing with the View and Subview Components 35
    6.3. Client ID Namespacing with the WLP NamingContainer .. 36
    7. Logging, Iterative Development, and Debugging Chapter ........ 39
    7.1. Logging............................................................................ 39
    7.2. Iterative Development ...................................................... 39
    7.3. Debugging ....................................................................... 40
    8. Custom JavaScript Chapter ..................................................... 42
    8.1. DOM Manipulation within a JSF ....................................... 42
    8.2. Form Validation within a JSF Portlet ................................ 45
    9. Preparing JSF Portlets for Production Chapter ........................ 46
    9.1. Configuration.................................................................... 46
    9.2. Performance and Scalability............................................. 47
    9.3. Security............................................................................ 49
    9.4. Localization...................................................................... 50
    Part 2: Interacting with the Portal Environment
    10. Native Bridge Architecture Chapter ...................................... 54
    10.1. Container Architecture Overview.................................. 54
    10.2. Container Architecture.................................................. 54
    10.3. Container Interactions .................................................. 55
    11. Interportlet Communication Chapter .................................... 56
    11.1. Using Session and Request Attributes for IPC (Anti-pattern) 56
    11.2. Using the WLP Event Facility for IPC with JSF Portlets 56
    11.3. Notifications ................................................................. 60
    11.4. Comparison of the IPC Approaches ............................. 60
    12. Scopes Chapter ................................................................... 62
    12.1. Conceptual Scopes for Standard JSF Applications ...... 62
    12.2. Conceptual Scopes for Portal Applications................... 63
    12.3. Implementation Patterns for Portal Scopes .................. 63
    13. State Sharing Patterns Chapter ........................................... 66
    13.1. State Sharing Concepts ............................................... 66
    13.2. HttpSession Versus HttpServletRequest ...................... 66
    13.3. Base Code for HttpSession Patterns ............................ 67
    13.4. Single Portlet Pattern ................................................... 68
    13.5. Multiple Portlet Patterns ............................................... 69
    14. Rendering Lifecycles Chapter .............................................. 77
    14.1. WLP and JSF Lifecycles .............................................. 77
    14.2. Invocation Order of WLP and JSF Lifecycle Methods... 77
    14.3. Accessing WLP Context Objects from JSF Managed Beans 78
    15. Portal Navigation Chapter .................................................... 80
    15.1. Programmatically Constructing JSF Portlet URLs ........ 80
    15.2. Changing the Active Portal Page.................................. 80
    15.3. Redirects within a Portal............................................... 83
    16. Ajax Enablement Chapter .................................................... 85
    16.1. Ajax in JSF Portlets...................................................... 85
    16.2. Partial Page Rendering Pattern.................................... 85
    16.3. Stateless API Request Pattern ..................................... 86
    16.4. Portlet Aware API Request Pattern .............................. 87
    16.5. Controlling the WLP Ajax Framework........................... 91
    17. Additional WLP Features Chapter........................................ 93
    17.2. Portlet Container Features ........................................... 93
    17.3. Portal Container Features ............................................ 98
    18. Example: Implementing a Login Portlet Chapter .................. 99
    18.1. Login Portlet Motivation................................................ 99
    18.2. Login Portlet Design..................................................... 99
    18.3. Login Portlet Implementation...................................... 101
    Part 3: Integrating Third Party Libraries
    19. Integration Overview Chapter............................................. 111
    19.1. Types of Libraries....................................................... 111
    19.2. Roadmap for MyFaces Trinidad and ADF Faces Rich Client 111
    20. Using the Facelets View Technology Chapter.................... 113
    20.1. Introduction to Facelets .............................................. 113
    20.2. Configuring Facelets Support ..................................... 113
    21. Using the Apache MyFaces Tomahawk Component Library Chapter 115
    21.1. What is Apache MyFaces Tomahawk? ...................... 115
    21.2. Support for Tomahawk in WLP................................... 115
    21.3. Tomahawk Component List........................................ 116
    21.4. Installing and Configuring Tomahawk......................... 119
    21.5. Resolving the Duplicate ID Issue................................ 120
    21.6. Referring to Resources .............................................. 120
    21.7. forceId Attribute.......................................................... 124
    21.8. File Upload................................................................. 125
    22. Using the Apache Beehive Navigation Controller Chapter . 126
    22.1. Apache Beehive Page Flow ....................................... 126
    22.2. JSF and Page Flows .................................................. 126
    22.3. Configuring the JSF Integration with Page Flows ....... 127
    Appendices
    23. Appendix 1: Consolidated List of Best Practices ................ 130
    24. Appendix 2: Known Issues and Workarounds.................... 132
    24.1. CR383659, CR383662 Inconsistent failures with JSF portlets 132
    24.2. CR342124: IllegalStateException due to duplicate client-id 132
    24.3. CR384916: IllegalStateException due to duplicate client-id when using certain components such as Tomahawk and Trinidad...... 133
    24.4. CR361477 Problems with the integration of JSF portlets with Apache Beehive Page Flows.................................................................. 133
    24.5. CR377945 JSF 1.2 suffers from a memory leak during iterative development .............................................................................. 134
    25. Appendix 3: The JSFPortletHelper Class ........................... 135
    26. Appendix 4: The CleanupPhaseListener Class .................. 147

    Hi Peter!
    First, I wish to thank you for the great work.
    We followed your whitepaper and managed to deploy a JSF portlet on WLS.
    But we are not able to register it (consume it) as remote portlet in Oracle Portal 10.1.4. The error log is as follows:
    An error occurred while trying to refresh the provider. (WWC-43190)
    An error occurred during the call to the WSRP Provider:
    java.rmi.RemoteException: serialization error: serialization error:
    unexpected null value for literal data; nested exception is:
    serialization error: serialization error: unexpected null value for literal data
    com.sun.xml.rpc.encoding.SerializationException: serialization error:
    serialization error: unexpected null value for literal data
    com.sun.xml.rpc.encoding.SerializationException: serialization error:
    unexpected null value for literal data
    Java stack trace from root exception:
    unexpected null value for literal data
    at
    oracle.webdb.wsrp.RegistrationContext_LiteralSerializer.doSerialize(RegistrationContext_LiteralSerializer.java:107)
    at
    com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:119)
    at
    com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:70)
    at
    oracle.webdb.wsrp.GetServiceDescription_LiteralSerializer.doSerialize(GetServiceDescription_LiteralSerializer.java:88)
    at
    com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalSerialize(LiteralObjectSerializerBase.java:119)
    at
    com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.serialize(LiteralObjectSerializerBase.java:70)
    at
    com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.java:473)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:62)
    at
    oracle.webdb.wsrp.WSRP_v1_ServiceDescription_PortType_Stub.getServiceDescription(WSRP_v1_ServiceDescription_PortType_Stub.java:63)
    at
    oracle.webdb.wsrp.client.design.v1.OraWSRP_v1_ServiceDescription_PortType.getServiceDescription(Unknown
    Source)Do you have any idea why this happens? Or you can provide some useful links to WLP -Oracle Portal federation?
    Thank you and best regards,
    PaKo

  • JSF calls DAO layer based on  JPA/Hibernate throws NPE

    I'm new in JSF and Hibernate;
    I'm using Hibernate as JPA provider, the dataaccess is tied to DAO layer; when my JSF controller(UserController) calls the getUsers() of my DAO layer
    (Glassfish is the app Server I use)
    NullpointerException is thrown, I assume it's because instance of BasicDAO is initialized, where do I have to instantiate BasicDAO
    here is my code :
    public class BasicDAO {      
    @PersistenceUnit(unitName = "test5PU")
    private EntityManager entityManager;
    public void setEntityManager(EntityManager entityManager)
    {        this.entityManager = entityManager;    }
    public List getUsers() {       
    Query query = entityManager.createNamedQuery("User.findAllUsers");
    return query.getResultList();
    public User findUser(String id) {       
    try{
    Query q = entityManager.createNamedQuery("User.findByIdUser");
    User o = (User)q.getSingleResult();
    return o;
    } finally {
    entityManager.close();
    public class UserController {
    /** Creates a new instance of UserController */
    public UserController() {      
    private DataModel model;
    private BasicDAO basicDAO;
    public DataModel getUsers() {            
    return new ListDataModel(basicDAO.getUsers());
    public void setBasicDAO(BasicDAO basicDAO) {     
    this.basicDAO = basicDAO;
    public BasicDAO getBasicDAO() {           
    return this.basicDAO;
    public User findUser(String id) {
    return basicDAO.findUser(id);
    List.jsp :
    <h:dataTable value='#{user.users}' var='item' border="1" cellpadding="2" cellspacing="0">
    <h:column>
    <f:facet name="header">
    <h:outputText value="IdUser"/>
    </f:facet>
    <h:outputText value="#{item.idUser}"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Password"/>
    </f:facet>
    <h:outputText value="#{item.password}"/>
    </h:column>
    </h:dataTable>

    in fact, i did some tests, and the reason why the NPE happens revealed to be caused by the call to
    this.emf = Persistence.createEntityManagerFactory(persistenceUnitName, emfProperties);
    which returns NULL value, and later when emf is accessed to create entitymanager NullPointerException is thrown.
    I think there is a configuration probem some where, except in persistence.xml file. my persistence.xml content is :
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="test9PU" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>JeeCertDB</jta-data-source>
    <class>persistence.user.User</class>
    <properties>
    <property name="hibernate.jdbc.driver"
    value="com.mysql.jdbc.Driver" />
    <property name="hibernate.jdbc.url"
    value="jdbc:mysql://localhost:3306/JeeCertDB" />
    <property name="hibernate.jdbc.user" value="root" />
    <property name="hibernate.jdbc.password" value="belly" />
    <property name="hibernate.logging.level" value="INFO" />
    </properties>
    </persistence-unit>
    </persistence>
    Message was edited by:
    S_screen

  • JavaServer Faces Custom Controller

    Hello,
    Is it possible to extend or adjust the JSF Controller? I'm in a situation where I need to develop an application for a browser client, and PDA client. Where JSF can render their UI components on different devices, what I need is a totally different view (layout) and navigation structure for the PDA client.
    Thus, a few years ago I would code a layer in my controller, sort of front controller, that chooses between a PDAController and a WebController, which in turn handles navigation etc..
    Is it possible to do this in JSF? I really like the RAD aspect of JSF, so if there's any way of combining these concepts...?
    Kind regards,
    Robbie

    Yes, it possible to do it in JSF as JSF support multiple renderer kit for different devices. Please read Renderer Kit section of the JSF specification to learn more about it
    http://jcp.org/en/jsr/detail?id=252
    - Winston
    http://blogs.sun.com/winston

  • JSF data table and commandLink

    Hi,
    Is the bug of using commandLink with datatable resolved for a request scope bean. The google search is not very helpful.
    I have already tried tomhawk datatable with preserveDataModel. Unfortunatelyy does not work.
    I am sure in JSF 2.0 it would have been resolved. Any help appreciated.
    Thanks
    Edited by: bhavin_monani on Nov 12, 2009 7:09 AM

    Problem #1
    I think commandLink will always forward all requests back to the JSF controller. If you do not have any actionListener on your commandLink (or do not use a backing bean's method as the action), you can use <h:outputLink> instead.
    Problem #2
    <link rel="stylesheet" href="<%=request.getServletPath()%>/css/coa.css"/>or
    <t:stylesheet path="/css/coa.css" />where <t:stylesheet> is from MyFaces Tomahawk.

  • ADF Controller in non-jdeveloper environment

    Hello,
    I have been using adf faces in eclipse environment with the JSF Controller (faces-config.xml). I need now to implement use case with adf task flows and for this purpose I need to configure the adf controller to be used (adfc-config.xml). I copied the adf-config.xml file from a corresponding jdev project, and also the weblogic-application.xml and web.xml fils, but this changes do not have any effect. Does anyone know if there are any other configurations needed to get the adf controller working?
    Thanks

    One of mine weblogic-appliction.xml from inside the EAR looks like
      <?xml version="1.0" encoding="windows-1252" ?>
    - <weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-application.xsd" xmlns="http://www.bea.com/ns/weblogic/weblogic-application">
    - <xml>
    - <parser-factory>
      <saxparser-factory>oracle.xml.jaxp.JXSAXParserFactory</saxparser-factory>
      <document-builder-factory>oracle.xml.jaxp.JXDocumentBuilderFactory</document-builder-factory>
      <transformer-factory>oracle.xml.jaxp.JXSAXTransformerFactory</transformer-factory>
      </parser-factory>
      </xml>
    - <application-param>
      <param-name>jps.credstore.migration</param-name>
      <param-value>OVERWRITE</param-value>
      </application-param>
    - <application-param>
      <param-name>jps.policystore.migration</param-name>
      <param-value>MERGE</param-value>
      </application-param>
    - <listener>
      <listener-class>oracle.adf.share.weblogic.listeners.ADFApplicationLifecycleListener</listener-class>
      </listener>
    - <listener>
      <listener-class>oracle.mds.lcm.weblogic.WLLifecycleListener</listener-class>
      </listener>
    - <listener>
      <listener-class>oracle.security.jps.wls.listeners.JpsApplicationLifecycleListener</listener-class>
      </listener>
    - <listener>
      <listener-class>oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener</listener-class>
      </listener>
    - <library-ref>
      <library-name>adf.oracle.domain</library-name>
      <implementation-version>11.1.1.1.0</implementation-version>
      </library-ref>
    - <library-ref>
      <library-name>oracle.jsp.next</library-name>
      </library-ref>
      </weblogic-application>so it's a bit different. If I look into the weblogic-appliction.xml file in jdev it look like the one you posted. Build one EAR from jdev and one from eclipse, unpack both into different folders (unpack the WAR too) and run a diff over the two folders.
    Timo

  • Struts & JSF

    I like the productivity that JSF components have to offer by way of ADF Faces and I also like using Struts in the controller layer. Reading all the posts here regarding this topic it seems like using struts-faces is just a migration strategy. We have lot of applications written in Struts and would use another framework only if there is a compelling reason to do so.
    Does Oracle endorse using struts-faces? Is JSF the way to go forward?
    I am hoping I can get some answers here.

    The way to go forward is to use JSF both for the view and the controller layer.
    Mixing the two usually doesn't produce good results.
    The JSF controller layer is more advanced than the old Struts framework and is the standard in JEE 5.0 - so you should definetly start looking into developing new applications with this framework.

  • Relation between URL and content in JSF navigation

    Hello,
    I've tried lots of JSF examples and there always occoured a strange kind of navigation to me:
    The URL you see in the browser's address bar has nothing to do with the actually displayed JSP. Instead of that, the URL is always pointing to the previously called JSP - where the call to the current JSP comes from.
    I know where this comes from:
    If the form tags don't define an action, they are pointing to the current page itself.
    And the actually called navigation case is chosen by a (hidden) post parameter.
    So the JSF controller servlet doesn't actually care, which URL is called - it just regards the mentioned parameter.
    This kind of navigation seems quite confusing, especcially since JSF claims to make navigation clearer.
    One of the basic demands of the web applications we are developing is, to have a clear relation between URL and page content.
    E.g. it must be possible to index the pages with search engines. Or to simply bookmark distinct pages in the browsers favourites.
    Another problem about this navigation concept is, that it always works with forms and with post method (you can't choose get method), even if you just have simple links - e.g. detail view of a single item after selecting it from a list of items. That way it's not possible to ever use the back button of your browser.
    I'm new to JSF, so my question:
    Is this the (one-and-only) navigation concept of JSF, or are there alternative concepts as well?
    I would be surprised, since the mentioned demands are basic web standard - although I didn't find any alternatives so far.
    Thanks,
    Chily

    Thanks for the answer!
    I'm not sure, if using a redirect on every single call is very achieveable and in the purpose of the JSF design.
    E.g. it is generating a lot of traffic overhead.
    (Identifying the navigation case by the page name instead of a hidden parameter would help a lot.)
    Or the history of the browser doesn't work with it, so you can't identify visited links.
    But anyways, there are also internal problems with it in most cases: I've inserted the <redirect/> tag in the navigation cases of a few examples. This just causes a call of the <to-view-id> page, without any parameters. So I probably have to add some non-standard-processing around the call to make it work:
    If e.g. I have the standard case of a list of items (let's say in a dataTable), which are identified by an id. And each item uses a commandLink to call it's detail view.
    * How do I get the identifier (id) as a parameter into the redirect URL?
    * And how do I access this parameter in the destination form bean to choose the item to be displayed? (see also http://forum.java.sun.com/thread.jspa?threadID=607505)
    Thanks for help,
    Chily

  • Life before struts, jsf

    Hello,
    I wanted to start studying struts but before actually diving into it, I also wanted to know how life was before struts, jsf etc.
    What I learnt:
    1. The registration form is a simple html form with its action as "register.html"
    2. The controller servlet creates a hashmap of all actions as keys and handlers as values. register.html has a corrosponding RegistrationHandler
    3. RegistrationHandler provides with the view.
    4. The view is a jsp page with a useBean that populates the bean. The bean class has a method that stores the data into database which is called from the view.
    So,
    View is the jsp page
    Controller is the Servlet
    Model is the bean
    I just wanted to know whether I am right with MVC or not. If right, where does struts, jsf fit in and where do they provide the flexibility.
    regards,
    vijay.

    The way to go forward is to use JSF both for the view and the controller layer.
    Mixing the two usually doesn't produce good results.
    The JSF controller layer is more advanced than the old Struts framework and is the standard in JEE 5.0 - so you should definetly start looking into developing new applications with this framework.

  • Why EJB for 10.1.3 JSF ?

    Hi,
    I'm a newbie in 10.1.3 and JSF.
    I found that the SR demo is different from 10.1.2 by using JSF and EJB.
    Does JSF prefer to use EJB ? How about ADF model used in 10.1.2 w/o EJB ?
    I remember 10.1.2 mentioned to use Struts as JSF controller, but now in 10.1.3 changes to Faces controller. What's the difference ?
    Regards

    I don't think we ever recommended to use Struts as the controller for JSF.
    If you choose to use JSF, and at Oracle we think JSF is a good choice, then go with JSF all the way both in the contoller and the view layer.
    JSF has many advantages including the component based nature of it, and the way it automates handling states ad actions. In general we find it easier to use JSF for Web development than a JSP/Struts combination.
    As far as the backend you can still use any combination you want, the first SRDemo that we released uses TopLink fronted by an EJB and binded using the ADF Model.
    There is already a beta version of the SRDemo using ADF BC out on OTN, and this along with a developer guide book using ADF BC will be out later this year.

  • MyFaces not rendering, ADF faces IS rendering

    I'm installing my app on the websphere application server, Version 6.1 After having issues of both adf and myfaces not working, I came accross this link which helped me somewhat. http://wiki.apache.org/myfaces/Websphere_Installation .
    By "not working" I mean that my jsp would have <h:commandLink>'s and <af:commandButton/> however the html was never actually generated. (You could view the pages source and the resulting html page was blank).
    After following those instructions, ADF components are correctly rendered, and the html works. However, I can not use any <h:> or <h:> components.
    Keep in mind, every single part of this used to work while using Tomcat (I think it was 5.5, not 6).
    faces-config-app.xml (our replacement for faces-config).
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
         <!-- ************ Application wide settings **************** -->
         <application>
              <!-- Spring resolve allows access to spring managed beans from <managed-bean> tags -->
              <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
              <!-- Local setup -->
              <locale-config>
                   <default-locale>en</default-locale>
                   <supported-locale>en</supported-locale>
              </locale-config>
              <!-- Message bundle base name -->
              <message-bundle>messages</message-bundle>
              <!-- Use the ADF Faces render kit -->
              <default-render-kit-id>oracle.adf.core</default-render-kit-id>
         </application>
         <lifecycle>
                <phase-listener id="responseHeaderController">com.unyric.cias.cm.web.util.HttpResponseHeaderController</phase-listener>
         </lifecycle>
    </faces-config>web.xml (Yes there is a lot of extra things in there such as application context params, but I wanted to paste the whole thing. Please bear with me).
    <?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>CIAS Case Management Web</display-name>
         <context-param>
              <description>JSF state setting: Keep state of views on client</description>
             <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
             <param-value>client</param-value>
         </context-param>
         <context-param>
              <description>JSF configuration files</description>
             <param-name>javax.faces.CONFIG_FILES</param-name>
             <!-- faces-config.xml contains applicaiton level configuration
                   faces-config-nav.xml contains screen flow configuration
                   faces-config-beans.xml contains managed bean definitions -->
             <param-value>/WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-nav.xml,/WEB-INF/faces-config-beans.xml</param-value>
         </context-param>
         <context-param>
              <description>Spring configuration files</description>
              <param-name>contextConfigLocation</param-name>
              <!-- presentationContext.xml contains presentation tier object configuration
                         applicationContext.xml contains Service & Dao object configuration as well as transaction demarcation
                         securityContext.xml contains Acegi Security configuration
                         hibernate.cfg.xml contains Hibernate specific configuration -->
                <param-value>/WEB-INF/presentationContext.xml classpath*:spring/applicationContext.xml classpath*:spring/validationContext.xml classpath*:spring/securityContext.xml classpath*:spring/hibernate.cfg.xml</param-value>
         </context-param>
         <context-param>
              <description>Validates JSF configuration files on startup</description>
             <param-name>org.apache.myfaces.validate</param-name>
             <param-value>true</param-value>
            </context-param>  
         <context-param>
              <description>Timmer Setting for Case Queue screen</description>
                 <param-name>pollingTimer</param-name>
                 <!-- Units are milliseconds -->
                 <param-value>60000</param-value>
         </context-param>
         <context-param>
              <description>Maximum number of rows shown in tables.</description>
                 <param-name>tableRowsPerPage</param-name>
                 <param-value>25</param-value>
         </context-param>
         <servlet>
              <description>JSF controller</description>
                 <servlet-name>FacesServlet</servlet-name>
                 <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- Requests handled by JSF -->      
         <servlet-mapping>
               <servlet-name>FacesServlet</servlet-name>
                <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <servlet>
                <description>Serves up ADF Faces resources</description>
                <servlet-name>AdfResourceServlet</servlet-name>
                <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
         </servlet>
         <servlet-mapping>
             <servlet-name>AdfResourceServlet</servlet-name>
             <url-pattern>/adf/*</url-pattern>
         </servlet-mapping>
         <listener>
              <description>Initializes Spring on application startup.</description>
              <display-name>Spring context loader</display-name>
              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
         </listener>
         <filter>
              <description>Enables Acegi Security framework integration. Acegi is used to secure services.
              Standard J2EE is used to secure web requests.</description>
              <filter-name>AcegiFilterChainProxy</filter-name>
              <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
              <init-param>
                   <param-name>targetClass</param-name>
                   <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>AcegiFilterChainProxy</filter-name>
              <servlet-name>FacesServlet</servlet-name>
         </filter-mapping>
         <filter>
                <description>Pre-processes requests to enable MyFaces extensions</description>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
             <init-param>
             <!-- Set the size limit for uploaded files.
               Format: 10 - 10 bytes
                       10k - 10 KB
                       10m - 10 MB
                       1g - 1 GB
               -->
                   <param-name>uploadMaxFileSize</param-name>
                    <param-value>6m</param-value>
             </init-param>
             <init-param>
                   <param-name>uploadThresholdSize</param-name>
                    <param-value>100k</param-value>
             </init-param>        
         </filter>
         <!-- MyFaces extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
           <filter-mapping>
                <filter-name>MyFacesExtensionsFilter</filter-name>
             <servlet-name>FacesServlet</servlet-name>
         </filter-mapping>
         <!-- MyFaces extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
         <filter-mapping>
             <filter-name>MyFacesExtensionsFilter</filter-name>
             <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
         </filter-mapping>
         <filter>
              <description>Pre-processes requests to enable ADF Faces functionality</description>
              <filter-name>AdfFacesFilter</filter-name>
              <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
         </filter>
           <filter-mapping>
                <filter-name>AdfFacesFilter</filter-name>
             <servlet-name>FacesServlet</servlet-name>
         </filter-mapping>
         <!-- Sitemesh Template Filter --> 
         <filter>
              <filter-name>sitemesh</filter-name>
              <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>sitemesh</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>     
         <!-- Keep Hibernate sessions open until request completes. This allows lazy loading
              of data in all tiers. -->
         <filter>
              <filter-name>OpenSessionInViewFilter</filter-name>
              <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
              <init-param>
                   <param-name>sessionFactoryBeanName</param-name>
                   <param-value>ciasSessionFactory</param-value>
              </init-param>
              <init-param>
                   <param-name>singleSession</param-name>
                   <param-value>false</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>OpenSessionInViewFilter</filter-name>
              <servlet-name>FacesServlet</servlet-name>
         </filter-mapping>
         <!-- The application automatically sends requests at timed intervals. This causes
                    the standard J2EE session to be refreshed at the timed intervals and thus it will
                    never timeout. This filter is used to distinguish between user prompted and
                    automatic requests. -->
         <filter>
              <filter-name>SessionTimeout Filter</filter-name>
              <filter-class>com.unyric.cias.cm.web.filter.SessionTimeoutFilter</filter-class>
              <init-param>
                   <!-- URL to be displayed after session timeout -->
                   <param-name>redirectUrl</param-name>
                   <param-value>timeOut.jsp</param-value>
              </init-param>
              <init-param>
                   <param-name>sessionTimeout</param-name>
                   <!-- Units are in minutes -->
                   <param-value>20</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>SessionTimeout Filter</filter-name>
              <url-pattern>/secure/*</url-pattern>
         </filter-mapping>
         <!-- Session Timeout (in minutes)
              We are essentially disabling container session
              handling in favor of SessionTimout Filter -->
           <session-config>
                <session-timeout>99</session-timeout>
           </session-config>
           <!-- Security Configuration -->
           <security-constraint>
                <web-resource-collection>
                     <web-resource-name>FacesServlet security</web-resource-name>
                     <url-pattern>*.do</url-pattern>
                     <!-- No <http-method> tag implies all methods -->
                </web-resource-collection>
                <web-resource-collection>
                     <web-resource-name>View security</web-resource-name>
                     <url-pattern>/secure/*</url-pattern>
                     <!-- No <http-method> tag implies all methods -->
                </web-resource-collection>
                <auth-constraint>
                     <description>Allow any authenticated user</description>
                     <role-name>*</role-name>
                </auth-constraint>
          </security-constraint>
           <login-config>
                <auth-method>BASIC</auth-method>
                <realm-name>CIAS-CM</realm-name>
           </login-config>
           <security-role>
                <!-- Roles recognized by Case Management. -->
                <!-- EXACT NAMES MUST BE COORDINATED WITH CHOICEPOINT -->
                 <role-name>case</role-name>
         </security-role>
         <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>
         <!--  CIAS CM Database -->
         <resource-ref>
              <res-ref-name>jdbc/cias</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
                <res-sharing-scope>Shareable</res-sharing-scope>
            </resource-ref>
         <!--  CIAS Error Handling   -->
           <error-page>
                 <error-code>500</error-code>
                 <location>/secure/errorPage.jsp</location>
           </error-page>
           <error-page>
              <exception-type>javax.faces.FacesException</exception-type>
              <location>/secure/errorPage.jsp</location>
           </error-page>     
    </web-app>Does anyone have any suggestions? Telling websphere to load the web-inf\lib directory before the AppServer\lib directory seems to have somewhat worked, but not completely.
    On a side note, if I have a page such as (ignoring the extra h, f and t declarations)
    <%@ taglib prefix="h"uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
    <%@ taglib prefix="af" uri="http://xmlns.oracle.com/adf/faces" %>
    <f:view>
         <af:document>
              <af:form>
                   <af:outputText value="hello2"/>
                   <af:commandLink id="button" action="#{exploreCaseListAction.promptPersonalQueue}" text="Login"/>
              </af:form>
         </af:document>
    </f:view>When I click on the commandLink button, I receive an error that states
    java.lang.ClassCastException: org.apache.xalan.processor.TransformerFactoryImpl incompatible with javax.xml.transform.TransformerFactory
    at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
    at com.ibm.ws.jsp.translator.visitor.validator.PageDataImpl._getInputStream(PageDataImpl.java:125)
    at com.ibm.ws.jsp.translator.visitor.validator.PageDataImpl.getInputStream(PageDataImpl.java:117)
    at org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:156)
    at org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:96)
    at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.validateTagLib(ValidateVisitor.java:988)
    at com.ibm.ws.jsp.translator.visitor.validator.ValidateVisitor.visitJspRootStart(ValidateVisitor.java:467)
    at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:138)
    at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121)
    at com.ibm.ws.jsp.translator.JspTranslator.processVisitors(JspTranslator.java:121)
    at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJsp(JspTranslatorUtil.java:181)
    at com.ibm.ws.jsp.translator.utils.JspTranslatorUtil.translateJspAndCompile(JspTranslatorUtil.java:83)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:349)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:317)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:226)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:131)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)
    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
    at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
    at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
    at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
    at com.unyric.cias.cm.web.filter.ThreadContextSessionIntegrationFilter.doFilter(ThreadContextSessionIntegrationFilter.java:46)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
    at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at com.unyric.cias.cm.web.filter.CiasIntegrationFilter.doFilter(CiasIntegrationFilter.java:112)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:193)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)I believe they are related, though I can't 100% say for sure. Any thoughts?

    I'm having the same problem, did you get any luck with this ?
    Thanks

  • Best strategy to upload a big data file and then to insert in db the content

    Hi,
    Here's our requirement. We have a web business application developed on JSF 1.2, JE66, WebLogic for application server, and Oracle for the data back end tier. We need to upload big data files (80 to 100 Mb) from a web page, and persist the content in database tables.
    What's the best way in terms of performance to implement this use case ? Once the file is uploaded on server a command button is available on the web page  to trigger a JSF controller action in order to save data in database.
    Actually we plan to keep in memory the content of the http request, and call insert line on each line of the file. But i think it's bad and not scalable.
    Is is better to write the file on server's disk and then use multiple threads to send the lines to the database ? How to use multi threading in a JSF managed bean ?
    Thanks

    In addition, LoadFromFile is overloaded to handle both BLOB and CLOB:
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       BLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT
    <BR>
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       CLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT

Maybe you are looking for

  • OSX 10.9.5  Edge Animate v. 2014 1.1 How do I put an object into a div in this version?

    The lesson says to go to Modify>group element into div, but this version just says Modify>Group Elements, there is no mention of div. 

  • File name end with *

    Hi , While working with files i found that a new file is always ends with "*" i.e suppose if my file name is abc.txt then my solris box displays it as abc.txt*. It is creating problem while creating and reading files. Please suggest , how can i get a

  • Is it possible to use more than one value in SUPPRESSCHARACTER option

    Hi, Is it possible to Suppress more than one value uisng SUPPRESSCHARACTER option in transformation file? if yes, any syntax? I have 'Z' and '1000' that i wish to suppress from the values being loaded. Any thoughts ? Thanks.

  • Removal order

    A removal order is created for a Equipment in the Service Management (PM-SMA) application component. Please tell me the process and with the t.codes flow??? Advance Thanks

  • Email setup craziness

    I spent about 2 hours on the phone with Verizon tech support yesterday, with a very nice and diligent support person. The 1st hour was spent getting the red light out on my Westell 6100 DSL modem. The next hour was spent trying to figure out why Thun