Logout & Caching in JSF w/ADF

Hi,
I have a PhaseListener class referenced in my faces-congfig.xml to prevent page caching so the user won't get errors if they click 'Back' in the browser after logging out. Well, that is the idea anyway. Here's my code:
package org.aero.kas.evc.userinterface;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
import javax.servlet.http.HttpServletResponse;
public class NoCachePhaseListener implements PhaseListener {
public NoCachePhaseListener() {
public void afterPhase(PhaseEvent phaseEvent) {
public void beforePhase(PhaseEvent phaseEvent)
//from it-eye.nl JSF and Cache-Control article
FacesContext fctx = phaseEvent.getFacesContext();
HttpServletResponse response = (HttpServletResponse)fctx.getExternalContext().getResponse();
response.addHeader("Pragma", "no-cache");
response.addHeader("Cache-Control", "no-cache");
response.addHeader("Cache-Control", "no-store");
response.addHeader("Cache-Control", "must-revalidate");
response.addHeader("Expires", "Mon, 1 Jan 2006 05:00:00 GMT"); //past
public PhaseId getPhaseId() {
return PhaseId.RENDER_RESPONSE;
When I run my page and subsequently click 'Logout' it takes me away from my app to our internal intranet home page, as it should. However, if I click 'Back', rather than being prompted to login (running on embedded OC4J in JDev 10.1.3.2 with jazn.xml populated) I get runtime errors that indicate that a view object is being executed:
javax.faces.el.EvaluationException: oracle.jbo.DMLException: Error while getting estimated row count for view object MyDelegations, statement SELECT count(1) FROM (select distinct * from delegation where admin_id = :AdminIdVar) ESTCOUNT.     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
What could I be missing?
Thanks,
Ginni

Interestingly, I modified my Logout action to use an actionListener:
public void logoutActionListener(ActionEvent actionEvent) {
ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
HttpSession session = (HttpSession)ectx.getSession(false);
session.invalidate();
with the action set to 'logout' (my global nav rule). Now the logout.jspx page comes up fine. I can still click 'Back' on the browser and get to the original page (with errors 'Invalid Column Type com.microsoft.jdbc.base.BasePreparedStatement')... is there any way to just not let this happen?

Similar Messages

  • [ANN] JSF and ADF Faces Q&A online session today

    Join us for an online discussion and ask your questions about JSF and ADF Faces. Today (Thu) at 10:00am PST (California time).
    http://www.oracle.com/technology/tech/java/newsletter/seminars.html

    Great here are a few IF there is time:
    1. How round trips will JSF and ADF Faces take upon initial page load? In other words, does the initial page load come with data already populated? This makes a difference for those of us who have data heavy pages with lots of lag. Currently with ADF - UIX it seems as though the page is loaded and then round trips are taken to populate the data in the page.
    2. Is a JSF and ADF faces project in future versions of JDeveloper more easily/efficiently source controlled than current ADF/UIX projects?
    3. What is the extent of the involvement of the struts framework in JSF and ADF Faces?
    Thanks very much Shay.
    -brian

  • Can i make portlet by JSF or ADF

    Hi All
    can I make portlet by JSF or ADF ?
    if I can , what do I need to deply it
    which version of infrastructure and middle-tier to deply it?
    do I need web-cetener OR SOA Suite ?
    thanks

    Good question !
    I would also like to know what is required to build and run an AJAX-enabled JSF page inside an Oracle portlet. There seem to be a few options for each component:
    JDeveloper ? 10.1.3.2 with WebCenter /or 11g preview
    JSF ? Oracle ADF Faces 11g tech preview /or Apache Trinidad 1.2.1
    OC4J portlet container ? 10.1.3.2 /or 11g preview
    Portal Faces Bridge ? which version ...
    Portal Server ? which version ...
    WSRP protocol ? v1 /or v2 ...
    This is a great start:
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html
    which says you can run the ADF Faces 11g preview on the OC4J 11g preview, either standalone or embedded in the JDev 11g preview, but it doesn't mention portlets.
    These are also good links for older JSF-in-a-portlet:
    http://blogs.oracle.com/shay/2007/02/02#a315
    http://www.oracle.com/technology/products/jdev/viewlets/1013/portletize_jsf_pages_viewlet_swf.html
    but are based on JDev 10.1.3.2 WebCenter, and don't mention the new Rich Client AJAX-enabled technology previews.
    This is good for Trinidad integration:
    http://www.oracle.com/technology/products/jdev/howtos/1013/trinidad/trinidad.html
    but is also based on 10.1.3.2 and does not mention portlets.
    I suppose it comes down to the availability of a Portal Faces Bridge library for the new preview, and whether there are any dependencies on the WSRP protocol and the Portal Server ????
    Mik

  • How to customize events, execute stored procedures using JSF and ADF BC

    As a java beginner, I started with developing simple web application using JSF and ADF business component through visual and declarative approach. I need to know how to customize events, execute stored procedures, invoke functions on triggering events associated with rich controls. for eg. how to write customized functions on button click or checkbox click events to achieve business requirement and can be modified whenever required.
    Edited by: 792068 on Aug 31, 2010 9:40 PM

    Which business layer is prefered to create interactive data model: 1. ADF business components or 2. Enterprise JavaBeans using Java persistance API (JPA) or 3. Toplink 4. Portlets
    which minimizes writing low level codes and how much OOPS knowledge is required for creating above business layer binding data to viewcontroller layer?

  • Migrating JSF to ADF

    Hi,
    Previously I worked on developing web applications using [JDK 1.4 + JSF 1.1 + EJB2.0 + OC4j10g AS]. Now I want to migrate my existing applications from JSF to ADF.
    Can any one provide me the steps/architecture/flow for doing the migration from JSF to ADF?
    Thanks,
    Liyakath
    Edited by: Liyakath on Mar 6, 2013 8:40 AM

    Liyakath, this is hard to answer.
    I guess you first have to tell use your milage using ADF. Then you have to decide which jdev version you want to migrate too. You have two choices here:
    1) 11gR1 with its current version 11.1.1.6.0 (11.1.11.7.0 should be out there soon?)
    2) 11gR2 with its current version 11.1.2.3.0
    The two releases will merge in 12c in the future. However, now they differ in there functionallty. 11gR2 has the full stack (SOA, BPMN...) and JSF1.2 whereas 11gR2 only comes with ADF but allows JSF 2.0. For a more detailed summary read https://blogs.oracle.com/onesizedoesntfitall/entry/which_jdeveloper_is_right_for and http://www.vesterli.com/2012/05/03/is-jdeveloper-1112-a-dead-end/ here you should read the comments too.
    Then you have to define if you only want to migrate or if you want to to a redesign which is more like a rewrite of your older applications. As we don't know where you want to go I advice you to look at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html side and check out some of the videos.
    Timo

  • JSP, JSF, and ADF

    I've just started playing around with this and was looking for samples/tutorials to help. Of the tutorials/samples I've seen, they appear to fall short of explaining an end-end example and stick mostly to JSF and the backing bean - usually displaying static data within a JSP and navigation. I'm a bit confused on how to call custom methods in my business services (application modules) and in turn use the view objects to fetch data from my database and display the results within a JSP using the JSF components.
    I realize the latest preview JDeveloper is without ADF but while I had time I was hoping to play around with ADF Faces to hit my development database. Guess I'm trying to make sense of how JSP, JSF, Business components, and my db connection all play together in order to set up a decent starting point for an app.

    You could use Jdeveloper 10G and play around with ADF Faces, look at the demos, and the sources behind them.
    There are a couple of papers on OTN like...
    Working with ADF Faces in JDev 10g:
    http://www.oracle.com/technology/products/jdev/howtos/10g/adfjsf/how-to-adf-faces-10gjdev.htm
    Roadmap for ADF Faces:
    http://www.oracle.com/technology/products/jdev/collateral/papers/9.0.5.0/adfuix_roadmap/adfuix_roadmap.html
    And many more... as I could find upon search...
    http://www.oracle.com/ultrasearch/wwws_otn/searchotn.jsp?p_Action=Search&p_Query=adf+faces
    The visual editing support for 'The ADF Model access through ADF Faces bindings' is under development (hence no tutorials), and will be available in future release (could be post 10G release).
    -Udupa

  • Create dynamic code on a JSF with ADF Faces

    Hi,
    the next is just sample, nothing to production system, but if I can do the sample I can do something to production system.
    Fine.
    let's suppose that I want to create a html link
    in run-time over a JSF page with ADF Faces component.
    I can do that, I did using javascript and Custom tag,
    but the html link is placed out of the body of the page instead of put it over the place that I put it in development-time
    so, now my question is:
    how I can generate dynamic code using ADF FACES component commandButton or any others.
    any suggestion??
    P.D. if you need more info ask me.

    Hello Jeanne.
    You are right, I used <f:verbatim> element to wrap all my non-JSF elements and it work. :)
    so good so far.
    but, dynamic code mean generate code in this case HTML in run-time.
    That is to say: write code HTML just in time I invoke a page.
    That is posible through Custom Tags.
    You create a Custom Tags this tag generate HTML code after to process any Business Logic. then you put the tag in the page that you want to use it
    someting like this:
    <afh:rowLayout halign="center">
    <afh:cellFormat halign="center">
    <ESE-utilities:populateMenu/>
    </afh:cellFormat>
    </afh:rowLayout>
    the just above bold line is my Custom Tag that generate HTML code
    and not work.
    but, if I replace the tag directly using HTML code in the page, for example:
    <afh:rowLayout halign="center">
    <afh:cellFormat halign="center">
    <f:verbatim>
    prueba
    </f:verbatim>
    </afh:cellFormat>
    </afh:rowLayout>
    it work
    so, now my new question is:
    ¿How can I use a Custom Tagthat generate HTML code, and that code have been written inside of my body page?
    Thanks in advantage for your reply.
    Mauricio

  • Caching static content in ADF

    Helllo ,
    I'm using Jdeveloper 10g ,
    I hope If any one can help me in caching static content in my page " Images and CSS and JS libraries "
    I use The AFC library and the page cach the static content for the same window , but if I open new window the page will load the static content another time is that " browser caching "
    I want to cache this content in the client PC not in page Scope only .
    and If I have miss understanding for caching concept I will be owe to you if you give me the correct concept
    rgds

    Hi,
    the AFC provides server side caching in that the dynamic parts are not re-build if not required. On the client side its the browser that usually takes care of the content caching
    Frank

  • "Developing Smart Web UIs with Ajax, JSF, and ADF Faces" example

    I'm trying to get this example (http://www.oracle.com/technology/pub/articles/cioroianu_jsfajax.html) to work within JDeveloper, during compilation I'm getting an error:
    C:\jptest\view\public_html\msgIndexResp.jsp
    Error(5): tags:property is not a registered tag in that namespace.
    C:\jptest\view\public_html\helloNameResp.jsp
    Error(5): tags:property is not a registered tag in that namespace.
    C:\view\public_html\ajaxCtrl.jsp
    Error(6): tags:response is not a registered tag in that namespace.
    Has anyone attempted at this example and ran into the same problem?
    Thanks
    -Wes

    There is no such document for (1) because we are in the process of delivering design time support for ADF BC integration with ADF Faces, as you mentioned.
    Therefore, you could either continue with ADF UIX, ADFm, ADF BC for the time being, or else try out ADF Faces with session scope Managed Beans. In either case, you'll want to convert this later on, when JDev 10.1.3 completes its support for ADF Faces / ADF BC drag-and-drop integration.
    Kind Regards.

  • JSF Caching old values on webpage.

    Hey Guys,
    I have a jsp page that updates a profile values. This seems to work since the values change on the Oracle Database are updated.
    The problem is when I view the profile the jsp shows the previous values. I hit shift refresh and the page shows the correct updated values.
    This is what I have in the page header.
        <HEAD>  
         <META http-equiv="PRAGMA" content="NO-CACHE">
         <META http-equiv="CACHE-CONTROL" content="no-store,NO-CACHE,must-revalidate,post-check=0,pre-check=0,max-age=0">
         <META http-equiv="Expires" content="-1">  I read some posts about using the phaselistener. I don't think I want all the pages to never be cached just a few that have changing data.
    http://turbomanage.wordpress.com/2006/08/08/disable-browser-caching-in-jsf/
    http://www.it-eye.nl/weblog/2006/11/20/adf-faces-and-cache-control/
    Any ideals out there??
    Thanks
    Phil

    yes, I debug with a lot of tools.
    I have firebug and live HTTP Headers for debugging too.
    After using live headers I found the issue.
    It was apache caching the page.
    on FireFox you can do about:cache
    Go to
    Disk cache device
    Number of entries:      6009
    Maximum storage size:      50000 KiB
    Storage in use:      49987 KiB
    Cache Directory:      C:\Documents and Settings\Phil\Local Settings\Application Data\Mozilla\Firefox\Profiles\v39gs8a2.phil\Cache
    List Cache EntriesThis showed my page with a 4 week cache. IE ignored this and used the meta tags but Firefox did it correct and cached it.
    I took this out of my apache
    ExpiresDefault "access plus 4 weeks"
    Works great now.
    Thanks
    Phil

  • Javascript and html menu to be used with ADF/JSF using JDeveloper

    I have a menu for a webpage that was originally built using html and javascript. I need to convert it to be used with JSF and ADF. In the html, the menu items used an unordered list inside of a div tag.
    It looks something like this:
    <!--<div id="shademenu" class="shadetabs">
    <ul>
    <li>Item1</li>
    <li>Item2</li>
    <li>Item3</li>
    <li>Item4</li>
    <li>Item5</li>
    <li>Item 6</li>
    </ul>
    </div> -->
    AND
    the submenu(s) have links that look something like:
    <!--<div id="dropmenu0" class="dropmenudiv">
    Data
    Data
    Data
    </div>-->
    It is unclear to me how to work with my javascript menu to get the same look and feel with JSF or ADF as I did with html. Any insights would be great. Thanks.
    Daniel
    Message was edited by:
    dannyc

    Hello,
    If you do not find any existing JSF component (in ADF Faces/Trinidad, or any other JSF library) you can for sure extend/create your own component with specific renderer that will be the HTML/Javscript that you want.
    So here some interesting pointers about the subject:
    - Buildin Custom JSF component (Chris Schalk)
    - Build Custom JSF Components) (Jonas Jacobi
    - Extending Default Render (and lot of other JavaEE blueprints)
    These links will give you a starting point.
    Regards
    Tugdual Grall

  • JSF/ADF Faces - ADF-BC example/howto?

    Hi,
    Background:
    ==========
    I know that ADF-BC databinding is not included in the JDev 10.1.3 preview.
    I read and searched nearly all howto's, examples, blogs on ADF-Faces available on the net.
    For the past months I learned how to use the ADF-BC with JClient.
    This convinced me to use the ADF-BC and it's binding features (a fantastic framework!!!!) for my model layer.
    I'm developping a web application.
    Most of the examples on ADF-Faces/JSF are on the View Layer.
    My question:
    ===========
    I read somewhere that JDev 10.1.3 production with drag and drop of ADF-BC databinding will be available only in the summer.
    Question 1:
    ==========
    I suppose that meanwhile it is still possible to use the ADF-BC as the model layer for JSF or ADF-Faces, but the databinding must be done manually, is this correct?
    Question 2:
    ==========
    If answer to 1) is yes.
    Where can I find a howto/best practice document that explains how to use ADF-BC with JSF/ADF-Faces in the backing beans?
    My purpose is to develop my code so that it will be "standard" / "compatible" with the production version of JDev 10.1.3.
    I prefer to use the de-facto JSF standard and code the bindings manualy instead of using Struts with available drag'n drop ADF-BC databinding.
    Your advice will be apreciated
    Frederic

    There is no such document for (1) because we are in the process of delivering design time support for ADF BC integration with ADF Faces, as you mentioned.
    Therefore, you could either continue with ADF UIX, ADFm, ADF BC for the time being, or else try out ADF Faces with session scope Managed Beans. In either case, you'll want to convert this later on, when JDev 10.1.3 completes its support for ADF Faces / ADF BC drag-and-drop integration.
    Kind Regards.

  • Weblogic Portal 10.3.5 using JSF 1.2 portlets with ADF faces

    We are developing Portal site using Weblogic Portal 10.3.5 with JSF portlet 1.2 and ADF faces (ADF Application runtime 11.1.1.5 ). But the JSF portlets not supporting ADF faces. Please let me know how we use ADF faces in JSF portlet 1.2 in Weblogic Portal.

    Hi Murthy,
    We did a detailed analysis.
    (1) How do we add ADF taskflows, JSF in to weblogic portal desktop/pages? Do we create portlet out of JSF, and display on desktop/page? If this is the case, what about ADf task flows?
    --> Taskflows can be deployed as WSRP2.0 portlets. Note 2 options are there JSF page as portlet or taskflow itself as portlets.
    (2) How do we integrate weblogic user profiles and UUP (unified user profiles) with ADF and JSF?
    --> ADF Security can use Weblogic Server realm as the security provider. Entitlements in WLP will have to be provided based on Weblogic Server roles. In case you are using external LDAP then both can be integrated withe external LDAP
    (3) Can anybody shed some light which this better?
    (a) weblogic portal with JPF (Java page flows), NetUI --Legacy approach
    Pros:
    -Easy Development
    -Well tested integrated
    Cons:
    -Future support
    -Enhancements may not be available
    -Not really portable or standards based
    (b) weblogic portal with ADF, JSF?
    Pros:
    -If your on Oracle stack then great
    -Standards based
    Cons:
    -JSF Portlet bridge issues
    -ADF Faces does not work on IE6!
    Well what we are going for is JSR 286, Trinidad components (Supports IE6), JSF.
    Difficult choice.
    Venkat

  • ADF, JSF in Weblogic Portal 10.3.2

    Hi,
    We are designing new portal application on weblogic portal.
    Per Oracle recommendations, use ADF, JSF instead of using legacy JPF, NetUI (BEA technologies).
    If we use ADF, JSF; My questions are
    (1) How do we add ADF taskflows, JSF in to weblogic portal desktop/pages? Do we create portlet out of JSF, and display on desktop/page? If this is the case, what about ADf task flows?
    (2) How do we integrate weblogic user profiles and UUP (unified user profiles) with ADF and JSF?
    (3) Can anybody shed some light which this better?
    (a) weblogic portal with JPF (Java page flows), NetUI --Legacy approach
    or (b) weblogic portal with ADF, JSF?
    Thanks,
    Murthy

    Hi Murthy,
    We did a detailed analysis.
    (1) How do we add ADF taskflows, JSF in to weblogic portal desktop/pages? Do we create portlet out of JSF, and display on desktop/page? If this is the case, what about ADf task flows?
    --> Taskflows can be deployed as WSRP2.0 portlets. Note 2 options are there JSF page as portlet or taskflow itself as portlets.
    (2) How do we integrate weblogic user profiles and UUP (unified user profiles) with ADF and JSF?
    --> ADF Security can use Weblogic Server realm as the security provider. Entitlements in WLP will have to be provided based on Weblogic Server roles. In case you are using external LDAP then both can be integrated withe external LDAP
    (3) Can anybody shed some light which this better?
    (a) weblogic portal with JPF (Java page flows), NetUI --Legacy approach
    Pros:
    -Easy Development
    -Well tested integrated
    Cons:
    -Future support
    -Enhancements may not be available
    -Not really portable or standards based
    (b) weblogic portal with ADF, JSF?
    Pros:
    -If your on Oracle stack then great
    -Standards based
    Cons:
    -JSF Portlet bridge issues
    -ADF Faces does not work on IE6!
    Well what we are going for is JSR 286, Trinidad components (Supports IE6), JSF.
    Difficult choice.
    Venkat

  • Adf image cache directory

    Hi,
    I am using oracle ADF EA 14. I realized that when deploying my application, it created a cache directory under my adf/image directory. What is the cache directory for? Because sometimes the cache directory is not created
    and the page does not have the image rendered.
    Any information on this issue is highly appreciated.
    Thanks.
    Antonio.

    Any suggestion on this issue?
    Thanks.

Maybe you are looking for

  • Freeze on blank screen with sound loop  when playing steam games

    Hi, I would really appreciate some advice. I've been troubleshooting this problem without success, Problem: Playing games on steam*, at some point, sometimes 5 minutes in, sometimes 2 hours in: - Screen goes blank, - last sound loops continuously, -

  • Issue in bursting of reports

    Hi, I upgraded old reports(BIP 10g) to that in BIP 11g using the upgrade assistant. I am trying to burst a report through a webservice using following report request params and schedulerequest params : reportReq.setAttributeFormat(test.getReportType(

  • Frequent Freezes

    I posted this same problem before without any rectification. I experience frequent freezes and finally located a problem in crash reporter when the report noted "unrecoverable usb crash on port 20." I have two usb mouses, Kensington turbo that is har

  • Last downladed site is not opening next time

    Last i download a software frm world4free bt next time when i was open that site its not opening and same thingsalso with youtube also and same problem also with Internet Explr its said that Firfox encounter a problem need to close

  • Audio Unit Bridge overlapping Logic.

    Hi all, Sylenth was previously working fine until I installed 9.1.8 update moments ago. My apology if my explaination is rather confusing but this is what I'm currently facing. I'm on 64bit logic and trying to load Sylenth, this window pops up. Sylen