How do I prevent the output of my JSP or Servlet pages from being cached by

I 've tried this code, but it cannot run.
<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
and
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
Anybody can help me?
thanks

Hi,
Since different browsers have different formats, this header settings may fetch your need....
<%
/** stop browser from caching */
response.setHeader("Cache-Control","no-cache,post-check=0,pre-check=0,no-cache");
response.setHeader("Pragma","no-cache");
response.setHeader("Expires","Thu,01Dec199416:00:00GMT");
%>
Regards
Collins

Similar Messages

  • How can you prevent encrypted folders that you created in disc utility from being deleted?

    How can you prevent encrypted folders that you created in disc utility from being deleted?

    bibst wrote:
    How can you prevent encrypted folders that you created in disc utility
    You cannot create encrypted folders in, or encrypt folders with, Disk Utility.
    You can create with Disk Utility encrypted disk images from folders. I assume that's what you mean.
    The proper way to do it is by setting the immutable bit. Read here
    <http://www.thexlab.com/faqs/immutableflags.html>
    about the immutable bits (and the trouble they sometimes create).
    The user immutable bit (uchg) is the same as the Finder lock, as described above by X423424X. It's a weak lock, with only a warning.
    The system immutable bit (schg) is more powerful. Once is set, the item cannot be deleted in Finder (even though Finder will ask for your password and may give you the impression that it can trash it; it will end with an error).
    I set it in Terminal, thus
    $ sudo chflags schg my_encrypted_disk_image
    and unset it also in Terminal
    $ sudo chflags noschg my_encrypted_disk_image
    (Note that, when you unset the system immutable bit, the change won't be reflected immediately in Finder, but the item can be trashed nevertheless.)

  • How do I stop the "Your Firefox is up to Date" page from loading after upgrading to ver. 6.0?

    I upgraded from Firefox 3 point something or other (if I could remember exactly, I'd tell you) about 2 weeks ago to version 6.0. Thereafter, Firefox always starts up with two pages; one is a page declaring "Your Firefox is up to Date" and, on another tab, the default home page for Firefox. (the Google one)
    It has continued to do that ever since, and I cannot find a way to stop the "Your Firefox is up to Date" page from loading at start-up.
    I'm running a pc with WinXP Professional w/Service pak 3.

    A suggestion for stopping the "Your Firefox is up to Date" page from loading at startup.
    Use MozBackup for this; get it at http://mozbackup.jasnapaka.com/.
    A good user friendly tutorial on it's use can be found at http://www.howtogeek.com/howto/2418/backup-your-mozilla-based-software-with-mozbackup/.
    Download MozBackup and read through the howtogeek tutorial.
    Exit Firefox.
    Open MozBackup and start the procedure.
    Follow the procedure except for a part where you RESTORE the profile; in the Components selection window in MozBackup, UNCHECK the "General settings" box (you remember the General tab in the Tools/Options window in Firefox where your homepage info is kept?)
    Continue with the procedure to the end.
    When you re-open Firefox, you should be getting the Google homepage without the "Your Firefox is up to Date" page.
    Go to Tools/Options/Privacy tab. If it looks different than what it used to, ie: you used to have the option to not accept cookies, etc and now you don't, open the drop-down menu in the Hisory portion there and click on "Use custom settings for history", which will provide options for more control.

  • How do I prevent the first line of text in a link from becoming indented?

    Hello.  In a div are two sentences.  They look fine until I change the second sentence into a link.  I tried adding a <span> tag, but doing so changed the class.  I tried placing the text of the second sentence into a separate div tag, but that didn't work either.  I tried applying a negative value in the text indent field but that moved that first sentence instead of the second sentence.  I am having trouble getting the div containing the second sentence to move into location beneath the first sentence, so I decided to work with all of the text inside of one div tag.  I would appreciate it if someone would let me know how to have both sentences be in a flush left position.  Thank you.

    The indent comes from the padding-left: 7px; in the CSS rule for the <a> tag
    a:link {
              color: #FFF;
              background-color: #000;
              text-align: center;
              padding-top: 8px;
              padding-right: 8px;
              padding-bottom: 8px;
              padding-left: 7px; /* CREATES UNWANTED LEFT INDENT IN FOOTER LINKS */
              text-decoration: none;
    That rule is good for your menu but not your footer links so create a new set of rules for links in the footer.
    .footer_cc_license a:link { 
              color: #FFF;
              background-color: #000;
    .footer_cc_license a:visited {
      color: #FFF;
      background-color: #000;
    .footer_cc_license a:hover {
      color: #FFF;
      background-color: #000;
       text-decoration: underline;
    .footer_cc_license a:active {
      color: #FFF;
      background-color: #000;
      text-decoration: underline;

  • When used as an Activex control in windows How can I prevent the "Q" logo from appearing between streaming videos?

    When used as an Activex control in windows How can I prevent the "Q" logo from appearing between streaming videos?

    Hello Cgifford,
    Welcome to National Instruments Forums.
    To output your signal to the PFI lines,
    you can use external connectios between OUT0 and PFI lines. You can also use
    the backplane to do so by routing into the same RTSI line.
    1)
    On the SCOPE and FGEN, the name of the
    terminals are actually “PXI Trigger Line x/RTSIx” but on the 6602 you might
    need to route the signal using the property:
    You can also use the DAQmx route signal which perform the same opperation.
    2)
    This will depend on the frequency of
    your pulse train. If this is lower than about 10 ms, then you can probably
    place this on a loop and start and stop the acquisition every time. If the
    frequency is higher than this, you will have to use:
    -       Scripting on the FGEN side (read more)
    -       MultiRecord Fetch (more information in the scope help file
    section “Acquisition Functions Reading versus Fetching”).
    3)
    The short answer is yes. The longer one
    might depend on how tight you need the synchronization to be (us, ns, ps). For
    very tight synchronization, you should look into here.
    Message Edited by Yardov on 06-18-2007 03:14 PM
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    property.JPG ‏7 KB

  • How do you prevent the organizer from mixing the order of pictures when down loading off the memory card?

    @How do you prevent the organizer from mixing the order of pictures when down loading off the memory card?

    This sounds like you are using Photoshop Elements, and the Photoshop Elements forum would be best at answering that.
    Photoshop Elements
    Gene

  • How can we  prevent the PO while creating the sales order

    Hi All,
    How can we prevent the PO number while creating sales order with existing PO. I have checked the box in sales document type as A but still im able to create sales order with same PO.
    Thanks in advance.
    Naveen

    Hi
    In VOV8 check the box
    Check Purchase Order Number
    The purpose of this field is to check for duplicate
    purchase order (PO) numbers during sales order entry. When you select A in
    this field, SAP gives a warning message during sales order creation if another sales
    document for same customer with the same PO number exists already. Leave this
    field blank if you do not want SAP to check for duplicate PO numbers.
    regards
    Prashanth

  • Have Operating System 10.6.8, Mail Program 4.6.  How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to m

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

  • How can I prevent the flushing of the buffer until the playing is finished in AS3?

    How can I prevent the flushing of the buffer until the playing is finished in AS3?
    Is it possible?
    The buffer is emptied and flushed 10-11 seconds before the real end of the flv file.
    The file is locally saved and I stream it though crtmp server.
    I cannot seek the last 10 seconds because of empty buffer. How can I stop flash from flushing the buffer at end?

    i used the same code and i got it working correctly...
    thanx a lot fot it...
    now i have one more problem with it.
    Actually i created a new class 'ErrorDialog' and the function showErrorDialog() inside it.
    now i want the option YES_NO_OPTION and the function sayshowMsgDialog() returning int value indicating the option selected from the dialog box.
    I tried it with following code
    public
    static
    int
    confirmDialog( String message_in, Component parent_in, String title_in,
    int messageType_in )
    try
    JOptionPane pane = new JOptionPane( message_in, messageType_in,
    JOptionPane.YES_NO_OPTION );
    JDialog dialog = pane.createDialog( parent_in, title_in );
    dialog.setResizable( false );
    dialog.show();
    int optionType = -1;
    try
    optionType = ( ( Integer )( pane.getValue() ) ).intValue();
    catch( Exception ee )
    optionType = -1;
    dialog.dispose();
    return optionType;
    catch( Exception e )
    e.printStackTrace();
    but, since return is after dispose() it is throwing an error 'missing return value'
    can i get some kind of solution for this?
    waiting eagerly...........
    -Soni

  • How can i retrieve the output of procedure using a select statement ?

    Hi every one.
    this mite be dumm ?
    how can i use the output of the a procedure containing multiple rows of data in a select statement ?

    This is not  a SQL Developer question. You should ask it in the SQL and PL/SQL forum.
    The short answer is you can't.  Sounds is if you are trying to use MSSQL techniques in oracle. Learn oracle techniques

  • How can you prevent the mac book pro from unexpectedly shutting off and beeping three times repeatedly?

    How can you prevent the mac book pro from unexpectedly shutting off and beeping three times repeatedly?

    The three beeps are an indication of a hardware problem. Power On Self-Test Beep Definition - Part 2 - Apple Support

  • How can i see the output of a form

    I am having one driver program and form.From these two how can i see the output.

    Hi Sunny
    You might already know; but for the driver program; a smartform is just a function module.
    (In the smartform; this function module name can be found in the menu tab Environment -> Function Module Name.)
    Note: The FM 'SSF_FUNCTION_MODULE_NAME' is obviously the correct way of getting the FM name from the smartform name !!
    So all you need to do is call this function module passing any variable / tables you need to pass to the smartform from your driver program.
    Hope it helps
    Neer

  • Prevent the Output Message when creating PO from inbound IDOC

    Hi SAP Gurus,
    In my project, I have to create PO from inbound IDOC (PORDCR) with a specific Document Type ('099').
    Requirement: These PO should not generate the output message while the others (Doc Type # '099') do.
    I have the Z fuction module which call BAPI_PO_CREATE for posting IDOC and it works fine.
    In the existing system, there are some set up that trigger the output message type for PO (output NEU) when using ME21 or ME22, as a result my PO created with output message.
    Can you please advise if there are some way (User Exit?) that prevent the output message in this scenario (specific PO Type) without touching the current Condition setup?
    I'm new in MM and really need help!
    Thanks,
    Elaine.

    Hi Vinod,
    I really appreciate your anwer. I'm going to explore this with my functional consultant.
    Just like to have more questions:
    1. Is it easier if we change the existing condition table instead of creating a new routine?
    2. There are two forms for routine 101 (FORM KOBEV_101 and FORM KOBED_101). Can you explain to me why we need 2 here for what purpose of each form.
    3. In the debug mode by using WE19 to post inbound IDOC, I change the SY-SUBRC = 4 and PO created without output message. Is it the right direction? Anything else I need to pay attention to?
    Thanks again.
    Regards,
    Elaine.

  • How to set up the output device in output determinatin with customer master

    Hi,
    I am doing the output determination using customer master and not conditions technique.  Can anybody please let me know how to set up the output device . I have done the following:
    1)  assigned output determination procedure DB00001 to acct group 0001
    2)  added output type BA00 to customer master documents tab with print as the medium.
    3)  On creating a sales order and changing it its giving the message
    BA00     515     No printer defined for output BA00
    Please provide me with some suggestions , how to resolve this issue.
    thanx
    Jayant

    1. tcode V/30 -> check BA00 type -> goto  "print" tab -> what's set in the "print param." field?
    2. IMG ->SD -> basic functions -> output control -> define print parameters -> V1 output -> for BA00 output type -> Assign a default printer. This is related with the "print param." set in step 1.
    For example: if "print parame." is set to '1' in V/30, then the default printer is assigned to sales organization.
    You can check F4 search help on the "print param." field (in V/30) to see what options you have.
    If you want to specify printer by customer account, you may need to use userexit.
    Edited by: Harry Wu on Jun 23, 2010 9:18 AM

  • How can I prevent the open/save file confirmation window popup ? Mine is currently set for "always do this action" but I still get the popup.

    Whenever I "export" a QIF file from my bank I get a File Action confirmation window popup. I have the correct application selected and I have it selected to "open" and "always do this action" but the popup always pops.
    I have checked the applications tab and the correct application is selected.
    How can I prevent the confirmation popup window please ?

    Cheers for the reply.
    I have deleted the rdf file but no difference. I still get the opening file box popup.
    From the resetting download actions link. Both lines in the about:config are missing.
    I have also tried switching the download option for the qif file to use a csr file but that also opens the confirmation box.
    I pulled this from the rdf file
    <RDF:Description RDF:about="urn:mimetype:handler:text/x-qif"
    NC:alwaysAsk="false"
    NC:saveToDisk="false"
    NC:useSystemDefault="false"
    NC:handleInternal="false">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:text/x-qif"/>
    <NC:possibleApplication RDF:resource="urn:handler:local:C:\Program Files\Microsoft Money\System\msmoney.exe"/>
    </RDF:Description>
    <RDF:Description RDF:about="urn:scheme:webcal"
    NC:value="webcal">
    <NC:handlerProp RDF:resource="urn:scheme:handler:webcal"/>
    </RDF:Description>
    <RDF:Description RDF:about="urn:mimetype:externalApplication:text/x-qif"
    NC:path="C:\Program Files\Microsoft Money\System\msmoney.exe"
    NC:prettyName="msmoney.exe" />
    Not sure if that helps.
    Thanks again for the reply

Maybe you are looking for

  • HP Envy Touchsmart 15-J004SA Laptop, intel core i7, 16GB

    Hi, So one evening i was doing my work on my desk the same as every other day and shut my computer down as normal.  I came back to my laptop the next day - which was still untouched in the same position. I open my lid, and find a crack all the way do

  • T-61 not playing movies

    After doing a recent Lenovo update, when I try to play a movie in my DVD drive, the movie starts and after about five seconds it stops and give me the message, "Playback Stopped.  Copy Protection Signal is Detected."  This is when playing it through

  • AC adapter bad? Powerbook won't run without battery

    I think my powerbook (G4 aluminum, purchased Dec 2005) AC adapter is bad--the powerbook won't boot up without the battery (which, thankfully has not been recalled!). I did check the AC issues listed in this Apple doc: http://docs.info.apple.com/artic

  • Running through songs....can anyone out there help?

    So, I have tried to reset, install the latest software, etc...here is the problem, as yet, unresolved...when I choose a song via albums or artists, it just runs through all of the songs and plays none of them. Has anyone heard of this before? THANKS

  • Reused alv grid - Sum one column of ALV Grid

    I'd like that one column of my alv grid to be sum... How can i do that abap'ly speaking... regards