JSF client side state saving

I know the following thing
**When the HTML form is submitted it carries the view state value back to the server in the form of an HTTP parameter. JSF uses the value of this parameter to reconstruct the view during the restore view phase. The view is restored by reversing the process used to obtain the view state: it is decoded and deserialized.**
so I have tried to run the following code in jsp page with jsf tags I was able to see the input hidden parameter with facesview state and its value
<f:view>
        <h1>Hello World!</h1>
        <h:form>
           <h:inputText value="#{phonebean.phonenumber}" converter="Pconverter" id="input" >
        </h:inputText>
       <h:outputText value="rakeshggh" />
       <h:commandButton action="test" value="submit" />
       </h:form>
        </f:view>the encoded html output i was able to view the following hidden value which holds the view state as foolows
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4s......very big value />
but my question is when i have removed the jsf form tag but had some components in the view but there was no hidden element which holds the view state on
client side , so I was wondering how the view state that stores on the client side goes to the server and gets reconstructed i.e the tree of components .It would
be great if someone throws light on this I would appreciate it !!!

rocky_nirvana wrote:
**When the HTML form is submitted it carries the view state value back to the server in the form of an HTTP parameter. JSF uses the value of this parameter to reconstruct the view during the restore view phase. The view is restored by reversing the process used to obtain the view state: it is decoded and deserialized.**
so I have tried to run the following code in jsp page with jsf tags I was able to see the input hidden parameter with facesview state and its value
<f:view>
<h1>Hello World!</h1>
<h:form>
<h:inputText value="#{phonebean.phonenumber}" converter="Pconverter" id="input" >
</h:inputText>
<h:outputText value="rakeshggh" />
<h:commandButton action="test" value="submit" />
</h:form>
</f:view>the encoded html output i was able to view the following hidden value which holds the view state as foolows
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4s......very big value />This is by the way only applicable if you have set view state saving to the Client Side.
but my question is when i have removed the jsf form tag but had some components in the view but there was no hidden element which holds the view state on
client side , so I was wondering how the view state that stores on the client side goes to the server and gets reconstructed i.e the tree of components .It would
be great if someone throws light on this I would appreciate it !!!As GET requests are idempotent, JSF can just reproduce the same view at the server side.

Similar Messages

  • JSF 1.0 - client side state saving fails

    Existing screen worked fine in Beta with client-side state saving. Fails in 1.0 Release with:
    java.lang.NullPointerException
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:997)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1022)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at com.sun.faces.application.StateManagerImpl.restoreComponentState(StateManagerImpl.java:273)
         at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:186)
         at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:239)
         at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    This exception is found in tomcat log. Nothing found in debug log. I switched state saving to server and screen works, however, I need the application to work with client state saving.
    Some screens in application work with client state saving. Some don't. All those that fail have the same exception as above.
    Any ideas?

    Hello
    I have the same problem but i am not using any verbatim tag in my case the problem only appears when i am using two custom validators for a inputtexd in the same page .
    the problem is solved using the server saving method but i want to use client saving method.
    If you have any ideas please help .
    this is the exeption :
    java.lang.NullPointerException     at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1004)     at com.sun.faces.application.StateManagerImpl.restoreComponentState(StateManagerImpl.java:352)     at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:240)     at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:228)     at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)     at java.lang.Thread.run(Thread.java:534)
    thanks
    yinbr
    Message was edited by:
    yinbr

  • ADF client-side state saving

    <p>Hi, I'm developing JSF with ADF and MyFaces. I want to minimise the load on my Server, e.g. by minimising use of session beans and other types of session storage. So I use the <t:saveState> from MyFaces instead. In web.xml I set the parameter:</p>
    <p>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    </p>
    <p>This makes all the MyFaces components store state on the client. However, this still doesn't force the ADF components to use client-side state saving(!). As described here, the default behaviour in ADF is to use a session token to store page state in HttpSession. In my project I've seen all sorts of strange behaviour when the session token exceeds the number of CLIENT_STATE_MAX_TOKENS. Of course I can try to increase this value, but this will lead to even more sesison usage. </p>
    <p>So, I tried setting another parameter in web.xml:</p>
    <p>
    <context-param>
    <param-name>oracle.adf.view.faces.CLIENT_STATE_METHOD</param-name>
    <param-value>all</param-value>
    </context-param>
    <p>
    <p>This should force all state to be moved to the client in a hidden form field. But when I do this I get this type of error:</p>
    <p>
    2006-10-25 13:21:30,854 ERROR (taglib.core.ViewTag:181) - Error writing body content
    java.io.NotSerializableException: oracle.adf.view.faces.component.core.input.CoreSelectOneChoice
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
    at java.util.ArrayList.writeObject(ArrayList.java:569)
    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:585)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
    at oracle.adfinternal.view.faces.renderkit.core.CoreResponseStateManager.writeState(CoreResponseStateManager.java:82)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspStateManagerImpl.java:430)
    at oracle.adfinternal.view.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:241)
    at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:145)
    at org.apache.jsp.pages.innkurv.innkurvMain_jsp._jspx_meth_f_view_0(innkurvMain_jsp.java:152)
    at org.apache.jsp.pages.innkurv.innkurvMain_jsp._jspService(innkurvMain_jsp.java:91)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at no.justisdepartementet.etterlysning.web.util.ContextResourceFilter.doFilter(ContextResourceFilter.java:69)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at no.justisdepartementet.etterlysning.web.util.RedirectFilter.doFilter(RedirectFilter.java:59)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    </p>

    <p>Thanks guys. I did indeed try to use <t:saveState> to save the CoreSelectOneChoice. More specifically, I tried to use <t:saveState> on a backing bean where one of its properties were a CoreSelectOneChoice. The backing bean itself needs to be serializable as well as all of its properties, so the solution is to set the local variable transient.</p>
    <p>After overcoming this problem, however, I found that some of my managed beans still had serialization problems because they had references to "service managers" that were dependency injected via JSF's managed means facility. See this blog for a discussion about serialization and MyFaces.
    </p>

  • ADF server-side state saving method

    Hi all,
    As far as I know, ADF has three view state saving methods.
    1. client - tokens
    2. client - all
    3. server
    My question is about server-side state saving.
    If I set state saving methos "server" in web.xml, view state is stored in session scope as LRU map.
    And the size of the map can be configured with below parameters in web.xml.
    <context-param>
    <param-name>com.sun.faces.numberOfViewsInSession</param-name>
    <param-value>10</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.numberOfLogicalViews</param-name>
    <param-value>5</param-value>
    </context-param>
    However I think these parameters is offered by Mojarra (Sun's JSF RI) and any ADF guides don't mention them.
    These parameters are supported in ADF?
    Regards,
    Atsushi

    Hi,
    don't have a support statement for this but would be surprised if we don't as ADF Faces runs on top of the JSF RI.
    However, I am wondering why your customer prefers state saving being handled on the server as it doesn't allow fail over for your application setup. Also it is the recommended option
    http://docs.oracle.com/cd/E25054_01/web.1111/b31973/ap_config.htm#CEGECDJF
    +"Context parameter javax.faces.STATE_SAVING_METHOD: Specifies where to store the application's view state. By default this value is server, which stores the application's view state on the server. *It is recommended that you set javax.faces.STATE_SAVING_METHOD to client* when you use ADF Faces, to store the view state on the browser client. When set to client, ADF Faces then automatically uses token-based, client-side state saving. *You can specify the number of tokens to use instead of using the default number of 15*.+
    +You can specify the following state-saving context parameters:+
    +org.apache.myfaces.trinidad.CLIENT_STATE_METHOD: Specifies the type of client-side state saving to use when client-side state saving is enabled by using javax.faces.STATE_SAVING_METHOD. The values for CLIENT_STATE_METHOD are:+
    +token: (Default) Stores the page state in the session, but persists a token to the client. The simple token, which identifies a block of state stored back on the HttpSession object, is stored on the client. This enables ADF Faces to disambiguate the same page appearing multiple times. Failover is supported.+
    +all: Stores all state information on the client in a (potentially large) hidden form field. It is useful for developers who do not want to use HttpSession.+
    +*Performance Tip:*+
    +Because of the potential size of storing all state information, it is recommended that you set client-state saving to token.+
    +*org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS*: Specifies how many tokens should be stored at any one time per user, when token-based client-side state saving is enabled. The default is 15. When the number of tokens is exceeded, the state is lost for the least recently viewed pages, which affects users who actively use the Back button or who have multiple windows opened at the same time. If you are building HTML applications that rely heavily on frames, you would want to increase this value.+
    +*org.apache.myfaces.trinidad.COMPRESS_VIEW_STATE*: Specifies whether or not to globally compress state saving on the session. Each user session can have multiple pageState objects that heavily consume live memory and thereby impact performance. This overhead can become a much bigger issue in clustering when session replication occurs. The default is off.+
    +org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE: Enables the Application View Cache (AVC), which can improve scalability by caching the state for the initial renders of the page's UI at an application scope. However, every page in the application must by analyzed for support in the AVC to avoid potential problems with debugging in an unexpected state and information leakage between users. Additionally, development is more difficult since page updates are not noticed until the server is restarted, and although initial render performance is enhanced, session size is not.+
    +*CAUTION:*+
    +The Application View Cache is not supported for this release. The feature does not work for any page where the rendering of the component tree causes the structure of the component tree to change temporarily. Since this is often the case, USE_APPLICATION_VIEW_CACHE should not be used."+
    So unless your customer has a good reason for server side state I would suggest him/her to go with best practices
    Frank

  • Why sever-side state saving doesn't support fail over?

    Hi all,
    In my previous thread "ADF server-side state saving method" Frank said that it doesn't support fail over.
    Re: ADF server-side state saving method
    My customer is wondering the reason.
    If anyone has a clear statement about it, could you share it?
    Any help will be much appreciated.
    Atsushi

    Timo,
    As I wrote in my previous thread, my customer adopted multi-windows application design because they didn't know it caused viewExpiredException frequently.
    Now I'm looking for the best setting for avoiding the exception and need ADF guru's help.
    Frank said that ADF is on Sun's RI. And it seems that the state-saving parameters of Mojarra are working correctly in my environment. However any ADF docs don't mention the behavior of server-side state saving clearly. When I set state-saving method "server", view states are managed per logical view (≒ window). And it seems better for multi-window application than using client-token based state management from the perspective of preventing viewExpiredException.
    Because fail over is not their requirement, if we could make sure that server-side state saving doesn't have other side-effects they might adopt it.
    So I'd like to know in more detail about the behavior.
    Thanks,
    Atsushi

  • Problem with server side state saving ,JSF 1.1.1

    Hello,
    In my web.xml  the.STATE_SAVING_METHOD setting is s server
    <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
    for measurement of application security isn't not allow to change this parameter to client , so the problem  when i access for application and i open a new page via linker for print for example and i would access for my initial page to make change or modify my initial page it s no possible to make any modification because i have a empty bean , but if the state saving is a client i haven't a problem because a tree map is stored in client browser, so my version of JSF is 1.1.1 ,
    So can you explain the cause for his problem
    and what's the solution for my problem ?
    NB:i can't change the parameter for STATE_SAVING_METHOD for a client
    Thank you

    did you search this form, there were lot of discussions in the past about server side cookies, you may find an answer to your problem.
    alternate approache for sending a value from parent page to the pop up window.
    1. when opening the pop up pass the values along with the url (if the size of variable is small)
    alternatively you can store the value in a hidden form field in parent window and access the same from poup window using
    you can simple access the page one form field value in page 2 (pop up) by using the following code.
    window.opener.document.getElementById('hiddenformfieldid').value

  • ADF EA 16, client state saving bug

    Hi,
    I have similiar issue as one reported at: Re: Bug in ADF client-side state saving.
    I have bug with <af:showDetail> component when using CLIENT_STATE_METHOD.
    I have this code in jsp:
    <af:showDetail id="payingItem" disclosedText="a" undisclosedText="b" styleClass="xpMenuBars"
    inlineStyle="margin-top: 10px; height: 24px; vertical-align: middle;" binding="#{outlookBar.payment}">
    When using token (server state saving) this HTML is rendered:
    <form><!-- Start: oracle.adf.ShowDetail["payingItem"] --><span id="m:payingItem"><div class="xpMenuBars" style="margin-top:10px;height:24px;vertical-align:middle" duplicate_style="vertical-align:middle"> ...
    You can see that inlineStyle attribute is printed out in HTML style attribute. When I use client side state method ("all" in web.xml) the inlineStyle is not transferred to style (it's empty):
    <form><!-- Start: oracle.adf.ShowDetail["payingItem"] --><span id="m:payingItem"><div class="xpMenuBars" style="" duplicate_style="vertical-align:middle">...
    Hope this will be resolved in EA17.
    Another question is why I have duplicate_style in HTML? Why renderer doesn't append style attribute. Browser wont recognize duplicate_style so it is quite useless.
    Regards, Miroslav Resetar

    You're seeing two separate bugs. One is the one reported earlier: inlineStyle can get dropped when saving state in the client. This has been fixed in EA17.
    The other thing you're seeing - with duplicate_style - is a different bug. It's not that we're outputting "duplicate_style" intentionally, but that our output code automatically (in debug mode) detects when someone tries to write out the same attribute twice (always a bug), and turns the second into "duplicate_xyz" to mark the mistake. So, the real bug is that when you set inlineStyle on af:showDetail, our code tries to write out "style" twice instead of merging the two together.

  • ADF Client State Saving

    I have a doubt about client state saving and ADF Faces Components/JSF.
    In my scenario, i have a hardware load balancer in front of two weblogic standard servers. The load balance is configured without affinity.
    The client token generated by the server hitted for the first roundtrip is not readable by the other server on a second roundtrip. I think because each server generates a different hash key. So when the load balancer forwards the client request to the other server in the webfarm, an error occurs because the server can not read the token.
    In .NET, we have a machineKey Attribute configurable in machine.config that let me configure the same hash key in both servers. In this way both servers can read the client token generated from each other.
    Is there something similar in ADF Faces/Weblogic scenario?
    Or ADF Faces Components can be fully stateless?

    John, in my scenario I am looking for scalability and high availability.
    Affinity does not provide high availability to users connected to a server in case of server's outage.
    Client state method setted to All does not fit in my scenario because the page is much complex and a large quantity of data would have to be stored in the client view state causing client slowdown and much network traffic overhead during roundtrips.
    So, or i use client state method setted to token and i be able to generate and read the same token by different servers in the webfarm (and store the session in JDBC persistent store) or i use ADF Faces in a complete stateless manner (nor state at client side neither at server side).
    My doubts are:
    - Is possible to generate and read the same client state token in different servers in a webfarm (http session stored in JDBC) like in ASP.NET through machineKey settings in machine.config?
    - Is possible to use ADF Faces Components in a complete stateless manner without having to store state at client side or server side to achive scalability?
    Best regards

  • Does Improved State-Saving Behavior in jsf 1.2 remove some restriction ...

    It was not possible (or not easy, note recommended) to manage more that one application form displayed in a browser without putting some confusion in the page data control binding.
    Browsers offer tab management, JavaX offer cut and paste, so user's put pressure to have many duplicated application form in their browser each synchronized with their own data control (and to cut and paste data from one to the another but it is not the question here).
    Does jsp 1.2 and the change in state-saving help to solve current problem ?
    Does Oracle plan to change something in adf framework to solve this issue ?

    To be more specific (if anyone here knows ASP.NET): The UserControl has something called Page, that component has Header and Body, if I add something to the Header (like Link for one) then it'll appear in the head section of my page.
    I need the component to add one JavaScript file that will contain my client-side logic (it's not trivial nor short so it needs to be externalized).
    Apart from that it's not doable for me to do all the rendering for myself because the controls I'm using have to be from RichFaces (architect's decision - not mine). So all I can do is either manually glue things together in the xhtml template directly and add the necessary JS to the template (again: manually), or create a compound component that will be composed of the two components that already do what I need them to do and add the necessary additional JS file automatically when the component is added to the page.
    However what I wanted to do is to create a component that will reuse the functionality of one of the RF components and add an input field in front of it that'll hold String and not Date (like the cumbersome RF component does).
    Can you help?
    Edited by: padcom on Jun 7, 2010 12:15 PM

  • Bug with h:messages and client state saving?

    I have an application that uses <h:messages ...> to display validation/conversion errors on the page. I find that when I use "client" for my javax.faces.STATE_SAVING_METHOD, the messages completely destroy the display of the web page - HTML seems to be randomly cut off. Using the "server" state saving method solves the problem. Has anyone else seen this behavior? I can duplicate it easily.
    Thanks,
    Don

    Can you provide us with the jsp page you are using? I do not immediately
    see the probem you are encountering.
    Thanks,
    --roger (jsf co-spec lead)                                                                                                                                                                                                                                                                                                   

  • Client side event for h:outputText... and other JSF component

    Hello friends...
    I need client side (to use Java script ) event for change in <h:outputText /> or <h:inputText...>.
    I want to open a popup window when there is a change in there. I donot want to use onblur() for this. Is there any thing for achiev it.
    Thanks.
    Regard
    Roshan Lal ( I don't know why there is "DOG" display in LIST )
    :-)

    Hi Jacek,
    Unfortunately I think you may be stuck extending Renderer. Another possibility is creating your component via a template, which will be available in JSF 2.0. However, as JSF 2.0 won't be out for a while... you can use JSFTemplating in the meantime:
    http://java.sun.com/developer/technicalArticles/J2EE/jsf_templating/
    http://www.theserverside.com/tt/articles/article.tss?l=JSFTemplateComponent
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • Disable or restrict System.out.println() statements on client side

    Hi All,
    This might be a stupid question, but i am still going ahead and asking the question.
    Is there a way to disable or restrict System.out.println() statements in applet code from executing on the client side by using settings in proxy server or firewall or other security settings.
    Thanks
    Nag

    Hi All,
    This might be a stupid question, but i am still going
    ahead and asking the question.
    Is there a way to disable or restrict
    System.out.println() statements in applet code from
    executing on the client side by using settings in
    proxy server or firewall or other security settings.
    System.out.println() calls are executed on the client machine, and thus do not pass through any firewalls or proxies. If the applet is signed, you can redirect the System.out, by System.setOut(...).

  • JDeveloper 11g - JSF Custom Validator - Client Side validation question...

    Hi all,
    I've created custom JSF validator.
    How to trow some client side ValidatorException in javascript?
    Thanks in advance,
    s o v i e t

    Try
    throw new TrValidatorException(
    null,
    summary,
    detail
    Frank

  • Precompiled SQL statement at client side ? (JDBC)

    Hi,
    Will Oracle support precompiled SQL statement for jdbc client ?
    Thanks

    A pre-compiled SQL statement on the client side makes absolutely no sense. Let's say the statement refers to system object id 1234 - the EMP table. But in the meantime the EMP table has been dropped and re-created as an index organised table and is now object id 7890.
    What about issues like scope, cost-based optimisation, etc?
    It honestly does not make the slightest sense to even want such a "pre-compiled client SQL" feature.
    > hmm.... Is there anyway to return the compiled SQL
    from database ?
    Yes - that is exactly what a cursor handle is. You give the database a SQL statement. It parses that and returns a SQL (aka cursor) handle for you to use and re-use.
    The typical (stateful) client would use the following template:
    -- open a database connection (usually returns a connection/session handle)
    hConnection = open DBconnection(params)
    -- parse/prepare a SQL statement (returns a SQL/cursor handle)
    hSQL = parseSQL( hConnection, 'INSERT INTO foo VALUES( :0, :1 )' )
    -- reuse the SQL statement
    while (Some_Condition)
    loop
    Some_Processing()
    -- bind values to the SQL statement variables
    SQLBind( hSQL, '0', var1)
    SQLBind( hSQL, '1', var2)
    -- execute the statement (it is not compiled or parsed again by the database)
    ExecSQL( hSQL )
    endloop

  • Dynamic binding of jsf component to html on client side?

    Hi,
    I am developing a CRUD JSF page, which would allow user to create (add) rows of data (or delete/cancel the data added) without server hit. I am using some Javascript that would allow to create/delete inputs (right now simple html input text component) all on client side. However, I dont know how do I bind this data to JSF's inputText component. Also I would need to bind this data to an ArrayList of String. I am working on IRAD 7, so I guess that limits some of the open source JSF library, if they are available out there. I would appreciate any help.
    THanks.

    I think the standard JSF solution would be not to do the create/delete of inputs on the client side, but to do it on the server side.
    If that is not your cup of tea, I think that the standard components will not be sufficient. So you are looking at either not binding the inputs to a component and just getting the values via the request parameters or creating a custom component capable of dealing with this.

Maybe you are looking for

  • How to format a hard drive for Linux?

    I have a hdd (500gb) that used to be my internal drive for my MBP 2012. It currently has Mac OS 10.10 and Ubuntu 14.04. I want to erase the drive though so I can make it strictly for Linux. The question is which format do I choose in disk utility. Th

  • Mac 10.5.8 won't restart after updates. just shows rainbow circle.

    I can't tell if the updates (e.g. Quicktime, etc) are not updating, or if it's just the computer that will not "restart" but I can't figure this out.  I've searched for a solution, but can't find one. Help?

  • Question about UDP behavior

    I have a program that uses a UDP transmitter. I use UDP because I specifically do not care if anyone is listening. I use UDP OPEN with a specific port to get a CONN ID. I use UDP WRITE with the conn ID and a specific DESTINATION IP and DESTINATION PO

  • E2000 Parental control tab missing - Mac OSX Lion

    I am trying to use the Parental Control feature. I can't use Cisco Connect as there currently isn't an update for this router for Mac OSX Lion The firmware version in the support site hasn't been updated for ages, and I am running the latest (v 1.0.0

  • Colour Coding for capacity planning

    Hello Everyone, Please tell me is there any way where we can show different colours in CM25 transaction. means my orders are showing in red colour lets say if my order crosses the finsh date of my last operation is should show in different colur..? i