Avoid caching in the client

I'm using servlets + jsp technology.
I have a form that inserts a person in the database.
When you post the form the servlet attends the request in the doPost method, calls a DAO object that inserts this data in the database, asigning an id number for this person and giving it back. to the servlet.
Then the servlet sends back a page that informs that the person has been inserted.
At this point (with the result page in the browser), the user click the back button. This shows the form again with all the data the he has completed before. If he click the OK button the form is posted again to the servlet, and a new person is inserted in the database with a new id. But this person is the same.
How can I avoid this?
I don't know if I'm clear enough. Please help
Thanks

For even more aggressive "don't cache this page", especially to fight various Microsoft IE versions' caching "features":
    public static void disableCaching(HttpServletResponse response)
        response.addDateHeader("Expires", 791589600000L); // Wed Feb 01 00:00:00 EET 1995
        response.addHeader("Cache-Control", "no-store,no-cache,must-revalidate,post-check=0,pre-check=0");
        response.addHeader("Pragma", "no-cache");
    }For more info: http://www.google.com/search?q=no-cache+pre-check+post-check+pragma

Similar Messages

  • Caching images in the client tier

    Hi,
    I've a JSP web application with images.
    In that application, two HTML pages are generated. Each HTML page has the same image im.gif.
    Everytime a navigate from one page to the other, the image im.gif is always loaded from the web server.
    I would like to keep the images cached in the client workstation.
    How can I do that?
    thanks a lote
    apaf

    Well, generally when an image is loaded the path of the image is loaded in the temporary internet files of your browser(IE) and if the location of the image is from the same folder in the web/application server then the browser first checks the Temporary Internet files to get the image. if it finds then it loads the image from there only. This normally happens unless you specify response.setHeader("Expires","-1") or something like that to specify the browser to always take from the web server.
    thanks
    Hi,
    I've a JSP web application with images.
    In that application, two HTML pages are generated. Each HTML page has the same image im.gif.
    Everytime a navigate from one page to the other, the image im.gif is always loaded from the web server.
    I would like to keep the images cached in the client workstation.
    How can I do that?
    thanks a lote
    apaf

  • Using the client result cache without the query result cache

    I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
    This is done using a result_cache hint in the query.
    select /*+ result_cache */ * from table
    As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
    The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
    Thanks.

    e3a934c9-c4c2-4c80-b032-d61d415efd4f wrote:
    I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
    This is done using a result_cache hint in the query.
    select /*+ result_cache */ * from table 
    As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
    The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
    Thanks.
    You haven't provided ANY information about how you configured the result cache. Different parameters are used for configuring the client versus the server result cache so you need to post what, if anything, you configured.
    Post the code you executed when you set the 'client_result_cache_lag' and 'client_result_cache_size' parameters so we can see what values you used. Also post the results of querying those parameters after you set them that show that they really are set.
    You also need to post your app code that shows that you are using the OCI statements are used when you want to use client side result cacheing.
    See the OCI dev guide
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci10new.htm#sthref1491
    Statement Caching in OCI
    Statement caching refers to the feature that provides and manages a cache of statements for each session. In the server, it means that cursors are ready to be used without the need to parse the statement again. Statement caching can be used with connection pooling and with session pooling, and will improve performance and scalability. It can be used without session pooling as well. The OCI calls that implement statement caching are:
      OCIStmtPrepare2()
      OCIStmtRelease()

  • How to inform the client when the jar files is updated?

    I have a question about jar file updatation by web start, please help me.
    If a client's jar file is updated in Web server and automatically downloaded to local cache, how the client know which jar file is updated?. If I want to do some special operation after updating a appointed jar file, how can I do?

    Contrary to common popular belief, this forum is not a free 'I will look up/abstract the documentation on your behalf' forum.
    You can look up sqlnet.expire_time on http://tahiti.oracle.com or may be even Google will work.
    Please do not abuse this forum by asking doc questions.
    Sybrand Bakker
    Senior Oracle DBA

  • ACE behaviuor if Cache sends original client IP ?

    Netpros,
    We are doing transparent caching with Blue-Coat and the caches have a bypass list where the web page is not cached and the client' original IP is sent from the cache to ACE to internet.
    Is there any feature on ACE which shall block this session?
    Thanks in advance
    Shukla.

    If the Bluecoat send client Ip address to Internet then the return packet has to go to the same active ACE... If the ACE is in one ARM mode and is you use PBR to send the WEB traffic to ACE to loadbalance across Bluecoat..then there should be Reverse PBR on the interfaces which return traffic come through and the has to forwaded to same active ACE ..Because once u enables Ip Spoofing on Bluecoat .. when it get a request from client.. Bluecoat will be initiating a different TCP session with source IP as client IP address.. so if this traffic dont come back to the same proxy and if it directly goes to the client then client will drop the packet

  • Possible to delete Offline Files content for a specific user from the Client Side Cache (CSC) ?.

    Hello Everyone,
    We would like to implement a script to delete the offline files in the Client Side Cache (CSC) for a nominated user (on Windows 7 x64 enterprise).
    I am aware that;
    1. We can use a registry value to flush the entire CNC cache (for all users) next time the machine reboots.
    2. If we delete the user's local profile it appears that Windows 7 also removes their content from the local CSC.
    However, we would like to just delete the CSC content for a particular nominated user without having to delete their local user profile.
    In our environment we have many users that share workstations but only use them occasionally. We don't use roaming profile so we would like to retain all the users' local profiles but still delete the CSC content for any users that haven't
    logged on in a week.
    Any ideas or info would be appreciated !
    Thanks, Makes

    Hi,
    I don't think this is possible.
    If you want to achieve it via script, I suggest you post it in official script forum for more professional help:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?category=scripting
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Karen Hu
    TechNet Community Support

  • [svn:fx-trunk] 11483: Adding a LRU cache for the transcoding results of a CFF based DefineFont4 tag to avoid transcoding the same font description twice .

    Revision: 11483
    Author:   [email protected]
    Date:     2009-11-05 16:01:37 -0800 (Thu, 05 Nov 2009)
    Log Message:
    Adding a LRU cache for the transcoding results of a CFF based DefineFont4 tag to avoid transcoding the same font description twice.
    Also we now throw a better error when CFFFontManager is asked to embed a local font by name as this is not yet supported.
    QE notes: Please test that the same font embedded twice does not take twice as long as a single embedding.
    Doc notes: N/A
    Bugs:
    SDK-23966 - Compiler should generate a warning or error when embedAsCFF is true and src:local is used for font embedding
    SDK-23806 - OEM compiler appears to transcode embedded fonts twice
    SDK-23788 - Search fonts recursively
    Reviewer: Paul
    Tests run: Checkintests, bug test cases
    Is noteworthy for integration: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23966
        http://bugs.adobe.com/jira/browse/SDK-23806
        http://bugs.adobe.com/jira/browse/SDK-23788
    Modified Paths:
        flex/sdk/trunk/lib/flex-fontkit.jar
        flex/sdk/trunk/modules/swfutils/src/java/flash/fonts/FontDescription.java
        flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tags/DefineFont4.java

  • How can I get a count of objects in the near cache? (Extend client)

    Hi,
    I'm trying to figure out how to get the count of objects in my near cache (from c++ client). Knowing the size of the near cache is a key factor when optimizing configurations for performance.
    However if I call size() on the cache handle I get the count of objects in the cache (ie the cluster). How can I get a count of objects in the near cache?
    Thanks
    Rich Carless

    H Rich,
    It may not be ideal, but I think you may be able to infer the size by using the HeapAnalyzer (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_heap_analyzer.html) facility, specifically the "class" based HeapAnalyzer. Its Snapshot representation http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_snapshot.html provides a mapping between class name and ClassStats (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_class_stats.html) which provides information on how many instances of a given class type are in memory. Note the reported counts are process wide but if your key or value type are distinct you may be able to infer your answer. I realize this is rather complex, my only other suggestion would be to just make some guesses on size and see how they effect performance.
    Mark
    Oracle Coherence

  • Using the Client Result Cache

    Hello everyone,
    I have a question regarding the use of the client result cache but first of all here are the informations about my database:
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0    Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    I have installed the Oracle Client Tools on my clientmachine. It has a tnsnames.ora like this:
    ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = FEA11-119SRV)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = orcl.local)
    The Client Result Cache is configured in the sqlnet.ora.
    ADR_BASE = /u01/app/oracle
    OCI_RESULT_CACHE_MAX_SIZE= 2048000
    OCI_RESULT_CACHE_MAX_RSET_SIZE = 1024000
    NAMES.DIRECTORY_PATH = (EZCONNECT, TNSNAMES, HOSTNAME)
    The Databaseserver is configured like that:
    SQL> col name format a30
    SQL> col value format a30
    SQL> SELECT name, value
      2  FROM   v$system_parameter
      3  WHERE  name LIKE '%result_cache%';
    NAME                   VALUE
    result_cache_mode           MANUAL
    result_cache_max_size           0
    result_cache_max_result        5
    result_cache_remote_expiration 0
    client_result_cache_size       1073741824
    client_result_cache_lag        3000
    After configuring client an server I try the followign SQL-Statement on the clientmachine:
    sqlplus oracle/password@orcl
    set autotrace traceonly explain
    SELECT /*+ result_cache */ *
    FROM testtable;
    SQL
    The execution plan show two operations: "SELECT STATEMENT" and "TABLE ACCESS FULL" but no the "RESULT CACHE" operation.
    Did I miss something?
    Any help would be appreciated
    Florian W.

    result_cache_max_size           0
    That means the result cache is disabled. You need to set it to a non-zero value. That is the maximum ammount of memory, in bytes, the database will allocate on the shared pool to dedicate it to the result cache for all requests.
    By the way, OCI_RESULT_CACHE_MAX_SIZE is optional. By default the sessions will have the maximum size they can occupy on the cache determined by CLIENT_RESULT_CACHE parameter, the client (OCI) side parameters override that.
    result_cache_mode           MANUAL
    Another thing to consider is RESULT_CACHE_MODE in MANUAL, that will cause only the statements with the RESULT_CACHE hint on it to be cached on the result cache. You can also set result cache to mode FORCE on specific tables with alter table command.
    Regards

  • Controlling the client-side cache

    At the current stage on my project I'm finding that I'm changing my mapping definitions fairly frequently (because the country side is just the wrong shade of egg-shell). Clearing the server side cache is fairly easy to do, provided you remember to do it, but my problem is on the client side.
    Right now, the tiles are returned with a one week time to live. So if I change the mapping definitions it might not propagate through to all the clients until up to a week later. What I'd like to do, at least for now, is turn off storing of map tiles on the client-side. The easiest way to do that would be to specify the cache-control header but I can't seem to find a configuration option for that.
    Has anyone setup MapViewer to use a different cache-control?

    Hi Mark,
    You can specify the cache control statements for the page itself.
    If this does not help, try to set expires header for the images. ex for Apache see mod_expires for a directory/location setting
    regards, michael

  • Java could not get the TGT from cache in Linux client.

    Dear friends,
    I have set up the kerberos server and OpenLDAP in RHEL5.5. I also have a RHEL6 as a client.
    I have ran my java program using jaas to query the openldap server from the linux client.
    1) I can query the openldap server If I copy the client's keytab to the client machine and use the following configruation options
         principal=wpingli
    useKeyTab=true
    keyTab="/home/wpingli/ker/java/wpingli_new.keytab";
    2) I also can query the openldap server If I am prompted to input the user/password.
    This makes me believe that my enviroment is ok.
    But I could not be sucessful if I run the java program after the kinit command.
    klist wpingli
    [wpingli@pli java]$ klist
    Ticket cache: FILE:/tmp/krb5cc_500
    Default principal: [email protected]
    Valid starting Expires Service principal
    10/20/11 16:18:06 10/21/11 16:18:02 krbtgt/[email protected]
    jaas configuration
    GssExampleSUN{
    com.sun.security.auth.module.Krb5LoginModule required
    client=true
    debug=true
    doNotPrompt=true
    useTicketCache=true
    ticketCache="/tmp/krb5cc_500";
    Exception:
    Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt true ticketCache is /tmp/krb5cc_500 isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
    Acquire TGT from Cache
    Principal is null
    null credentials from Ticket Cache
    *[Krb5LoginModule] authentication failed*
    Unable to obtain Princpal Name for authentication
    Authentication attempt failedjavax.security.auth.login.LoginException: Unable to obtain Princpal Name for authentication
    Does anyone have idea on this problem?
    Thanks,
    Ricky

    Dear friends,
    I have set up the kerberos server and OpenLDAP in RHEL5.5. I also have a RHEL6 as a client.
    I have ran my java program using jaas to query the openldap server from the linux client.
    1) I can query the openldap server If I copy the client's keytab to the client machine and use the following configruation options
         principal=wpingli
    useKeyTab=true
    keyTab="/home/wpingli/ker/java/wpingli_new.keytab";
    2) I also can query the openldap server If I am prompted to input the user/password.
    This makes me believe that my enviroment is ok.
    But I could not be sucessful if I run the java program after the kinit command.
    klist wpingli
    [wpingli@pli java]$ klist
    Ticket cache: FILE:/tmp/krb5cc_500
    Default principal: [email protected]
    Valid starting Expires Service principal
    10/20/11 16:18:06 10/21/11 16:18:02 krbtgt/[email protected]
    jaas configuration
    GssExampleSUN{
    com.sun.security.auth.module.Krb5LoginModule required
    client=true
    debug=true
    doNotPrompt=true
    useTicketCache=true
    ticketCache="/tmp/krb5cc_500";
    Exception:
    Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt true ticketCache is /tmp/krb5cc_500 isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
    Acquire TGT from Cache
    Principal is null
    null credentials from Ticket Cache
    *[Krb5LoginModule] authentication failed*
    Unable to obtain Princpal Name for authentication
    Authentication attempt failedjavax.security.auth.login.LoginException: Unable to obtain Princpal Name for authentication
    Does anyone have idea on this problem?
    Thanks,
    Ricky

  • How much info about the cache-cluster does the client have and What would you recommend about putting the cluster behind virtual ip

    Hi,
    I will appreciate if someone can point me to some documentation as to how app-fabric client library accesses the app-fabric cluster.
    What I have found so far is that the list of hosts provided in the client configuration are used as an entry point into the Cache-Cluster. By connecting to one of hosts, the client will download information about all the hosts constituting the cluster.
    Since a named cache is distributed across the entire cluster, and the data can be stored on any node. How does the client decide which node it should connect to, to get the data from. Does the client have enough information to know which host has the data
    or the client will connect to one of the nodes, if the node has data, it will serve it otherwise redirect the client to the node that has the data.
    I also would like to know what do you say about the idea that we would like to put our cache-cluster behind a virtual ip, so that if needed, we can take down nodes or add more nodes. In fact the virtual ip will that of a load balancer, but we don't plan to
    use it for load balancing purposes but the idea is that the client will have the virtual ip address and we can repoint this IP address, if we need to take out a node for maintenance reason. 

    I'm not sure about the reason for putting the cache servers in a VIP, but one of the reasons why the cache servers should be made known to the servers is because of auto load balancing and throughput
    Imagine i have 10 cache servers running on 1G ethernet links, theoretically i have 10G usable bandwidth and the clients will be able to manage and load balance if any of the cache server fails or have performance issues
    Now if all these were parked behind a VIP
    1. The LB now does the load balancing, which may not be optimal
    2. The LB may not have 10G upstream and 10G downstream, even if it has, this is quite a waste of resource\

  • Avoid the browser cache display the previous version of my flash website

    I frequently update my website. But customers do not see immediately the changes as the cache displays the previous version.
    How do I avoid this? Any advice is highly appreciated.

    Hi, this is a bit of a wrong forum since your problem doesn't pertain to AS per se, but for what it's worth I'm gonna tell you how i deal with the browser caching and it helped me (both SWF and JavaScript caches). I always use the Dreamweaver site and after I'm done compiling the SWF file I suply "Upload" the file to the testing/remote server. Hope that helps.

  • How can we avoid installing java3d runtime envoirnment on the client side

    Hi All, my applet uses java3d api. To see this applet in the browser on the client side we need to install java3d runtime envoirnment. Is it neccassary or can we avoid it. If we can avoid installing java3d runtime env , how can we do that.. Can Java WebStart help in this.
    your suggestion will be valuable..
    Thanks
    Akhil

    Yes, of course we can avoid it. Just as we can avoid asking the user to download the JRE if they want to run java.
    The only slight pay off we make for that is that the program won't run at all on their computer.
    As long as this is not an issue, there should be no problem.
    Seriously, my understanding is that Web-Start can hide the fact that we are installing Java 3D on their machine or at least make the installation very simple. There is no way to run Java3D applications without Java3D.

  • HT203071 How does the clients (iOS devices) to configure/use the caching server to download apps from local caching server instead of App store?

    Hi ... How does the clients (iOS devices) to configure/use the caching server to download apps from local caching server instead of App store?

    Hi,
    If you want to restore a reomoved app,you need to use
    Add-AppxPackage to add a signed app package (.appx) to a user account.
    But we cannot extract them from the ISO.
    The behavior is by design.And this is a software protection regime.
    Thanks for your understanding.
    Regards,
    Kelvin Xu
    TechNet Community Support

Maybe you are looking for

  • Error while deleting Instance

    During the deleting of an SAP instance, I receive these messages.  I am using the SAPinst to perform the delete.  I receive this error during the Drop instance phase.  The instance is an SCS instance.  This is the last instance to be removed.  Can an

  • Best network setup help

    Good day everyone! I read some posts here on some concerns with DSL modem/router w/ Airport extreme and would like to ask for the best setup. Here's the setup. ISP provided: 1. DSL modem- DHCP is set to OFF 2. DSL modem is currently using 192.168.1.1

  • My "layout" view has disappeared. how do I get it back?

    I don't know how this happened but my "layout" view has disappeared and has been replaced by THIS view: I must have triggered some command but for the life of me I can't retrace my steps. Anyone know what caused this? Thanks in advance for any assist

  • Transfering items from one customer to another customer

    Hi Gurus, I have a requirement where we have to transfer the items from one customer to another customer in the same company code. We should also be clearing the items from the old customer as part of the transfer. Is there a way/transaction in ECC 6

  • JOptionPane.showMessage doesn't display message & icon in Solaris

    Hi huys, JOptionPane.showMessageDialog doesn't display message & icon in Solaris, but display is proper through XWin. Any help is appreciated. Edited by: Quest_4_Java on Oct 29, 2008 12:15 AM