Caching a web page in client machine's Temp file

Hi Friends,
I'm struck up with one issue in caching the web page in client machine's temporary internet files. I have designed a secured web application. I used
<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
%>
for not storing the web page in client machine. Now only some of the pages that doesn't needs the security needs to be cached in the client machines temporary internet files.
For that i used the code as
<%
response.setHeader("Cache-Control","public");
response.setHeader("Pragma","public");
response.setDateHeader ("Expires", 0);
%>
Still i'm unable to store. Please help me solve this. Thanks in Advance. Quick help would be greatly appreciated.
Thanks and regards,
Prakash

Hi Rob_Jones-
I would recommend reading this Support article, as it troubleshoots issues with opening/downloading files:
[[Managing file types]]
Hope that helps.

Similar Messages

  • Deployment of JavaFX Web application on client machine(Windows OS.)

    Problem Statement:
    Deployment of JavaFX Web application on client machine(Windows OS.)
    Error: unable to load the native libarary(JNI Windows dll) i.e. throws java.lang.UnsatisfiedLinkError exception.
    Problem Description:
    I have create the JavaFX application which have dependency on Native library written in Java Native Interface(JNI).
    When the application is deployed on Apache 6.0 Tomcat Server(Copied .html file *.jnlp file and .jar file) and when client machine hit the html page in internet explorer version 8.0 its throws the following error(java.lang.UnsatisfiedLinkError: no JNIHelloWorld in java.library.path)
    Note:
    I have created the jar file which have my "JNIHelloWorld' native library dll in root directory. I have signed the jar with same signature which i have used for signing for my application Jar file.
    I have mentioned the native library jar in JNLP file resource keyword as follows:
    <resources os=Windows>
    <nativelib href="JNIHelloWorld.jar" download="eager" />
    </resources>
    The complete jnlp file content is in "JavaFXApplication.jnlp file:" section below.
    The description of error is as follows:
    Match: beginTraversal
    Match: digest selected JREDesc: JREDesc[version 1.6+, heap=-1--1, args=null, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null], JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_07
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files\Java\jre7\bin\javaw.exe
    args is: null
    native platform is: Windows, x86 [ x86, 32bit ]
    JavaFX runtime is: JavaFX 2.2.1 found at C:\Program Files\Java\jre7\
    enabled is: true
    registered is: true
    system is: true
         Match: ignoring maxHeap: -1
         Match: ignoring InitHeap: -1
         Match: digesting vmargs: null
         Match: digested vmargs: [JVMParameters: isSecure: true, args: ]
         Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: ]
         Match: digest LaunchDesc: http://10.187.143.68:8282/KPIT/JavaFXApplication20.jnlp
         Match: digest properties: []
         Match: JVM args: [JVMParameters: isSecure: true, args: ]
         Match: endTraversal ..
         Match: JVM args final:
         Match: Running JREInfo Version match: 1.7.0.07 == 1.7.0.07
         *Match: Running JVM args match: have:<> satisfy want:<>*
    *java.lang.UnsatisfiedLinkError: no JNIHelloWorld in java.library.path*
    *     at java.lang.ClassLoader.loadLibrary(Unknown Source)*
    *     at java.lang.Runtime.loadLibrary0(Unknown Source)*
    *     at java.lang.System.loadLibrary(Unknown Source)*     at javafxapplication20.JavaFXApplication20.<clinit>(JavaFXApplication20.java:41)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at com.sun.javafx.applet.FXApplet2.init(FXApplet2.java:63)
         at com.sun.deploy.uitoolkit.impl.fx.FXApplet2Adapter.init(FXApplet2Adapter.java:207)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Java Plug-in 10.7.2.11
    Using JRE version 1.7.0_07-b11 Java HotSpot(TM) Client VM
    User home directory = C:\Users\io839
    Please find my native library code and JavaFX application code:
    Native library JNI Code:
    JavaFXApplication.java:
    JNIEXPORT jstring JNICALL Java_javafxapplication_SampleController_printString(JNIEnv *env, jobject envObject)
         string str = "hello JNI";
         jstring jniStr = env->NewStringUTF(str.c_str());
         return jniStr;
    JavaFX Application code:
    JavaFXApplication.java:
    package javafxapplication;
    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    public class JavaFXApplication extends Application {
    @Override
    public void start(Stage stage) throws Exception {
    Parent root = FXMLLoader.load(getClass().getResource("Sample.fxml"));
    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.show();
    * The main() method is ignored in correctly deployed JavaFX application.
    * main() serves only as fallback in case the application can not be
    * launched through deployment artifacts, e.g., in IDEs with limited FX
    * support. NetBeans ignores main().
    * @param args the command line arguments
    public static void main(String[] args) {
    launch(args);
    static{
    System.loadLibrary("JNIHelloWorld");
    SampleController.java file:
    package javafxapplication;
    import java.net.URL;
    import java.util.ResourceBundle;
    import javafx.event.ActionEvent;
    import javafx.fxml.FXML;
    import javafx.fxml.Initializable;
    import javafx.scene.control.Label;
    public class SampleController implements Initializable {
    @FXML
    private Label label;
    private native String printString();
    @FXML
    private void handleButtonAction(ActionEvent event) {
    System.out.println("You clicked me!");
    String str = printString();
    label.setText(str);
    @Override
    public void initialize(URL url, ResourceBundle rb) {
    // TODO
    //String str = printString();
    JavaFXApplication.jnlp file:
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="JavaFXApplication.jnlp">
    <information>
    <title>JavaFXApplication20</title>
    <vendor>io839</vendor>
    <description>Sample JavaFX 2.0 application.</description>
    <offline-allowed/>
    </information>
    <resources>
    <jfx:javafx-runtime version="2.2+" href="http://javadl.sun.com/webapps/download/GetFile/javafx-latest/windows-i586/javafx2.jnlp"/>
    </resources>
    <resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="JavaFXApplication.jar" size="20918" download="eager" />
    </resources>
    <resources os=Windows>
    <nativelib href="JNIHelloWorld.jar" download="eager" />
    </resources>
    <security>
    <all-permissions/>
    </security>
    <applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="JavaFXApplication" >
    <param name="requiredFXVersion" value="2.2+"/>
    </applet-desc>
    <jfx:javafx-desc width="800" height="600" main-class="javafxapplication.JavaFXApplication" name="JavaFXApplication" />
    <update check="always"/>
    </jnlp>

    No problem.
    Make sure your resources are set at the proper location. Could be that tje jni.jar is under a 'lib' folder?
    Normally you don't have to worry about deployment a lot if you are using like Netbeans 7.2 or higher.
    When you press 'Clean and build' it creates your deployed files in the 'dist' folder.
    You can change specification by adapting the build.xml file.
    Of course lot of different possibilities are available for deployment!
    You can find lot of info here:
    [http://docs.oracle.com/javafx/2/deployment/jfxpub-deployment.htm|http://docs.oracle.com/javafx/2/deployment/jfxpub-deployment.htm]
    Important to know is if you want to work with
    - a standalone application (self-contained or not)
    - with webstart
    - or with applets
    (In my case I'm using webstart, but also Self-Contained Application Packaging (jre is also installed!)

  • Printing web page at client side

    i want to print web page at client side . Page & printer settings are through coding. i tried using
    DocFlavor myFormat = new DocFlavor("text/plain; charset=utf-16be","java.net.URL");
    i found exception invalid flavor

    If you are trying to print a web page on the client side, you have to use the browser's print function which can be invoked through JavaScript. What you are trying to do can't possibly work. Even if you weren't getting an exception, it wouldn't work. Any Java code in the JSP will have no effect on what happens on the client's machine.

  • Cacheing of web pages

    Hi All,
    I have a application hosted on Oracle 9iAS. I have used apache as a proxy to the application server. How do I instruct 9iAS not to cache any web pages. Basically when the user presses the back button I need it to refresh the page and not bring we one from the cache.
    Regards,
    Abraham

    You are talking about not allowing the browser to cache the page. This has nothing to do with Oracle9iAS cache.
    This is done by use of the <META> NO-CACHE tag in HTML. I don't know the syntax off the top of my head, but try any HTML reference and it'll tell you how to do it.
    Hope this helps,
    Ashesh Parekh
    Oracle9iAS Product Management

  • Caching for Web Portal Authenticated clients

    Reading CUWN documentation, Sticky Key Caching works only on WPA2-enabled WLANs.   Is it possible to enable a caching to help Web Portal Authenticated clients perform intra-controller roaming faster?

    Ok, so here's how it works:
    When the client gets on the network, the controller contacts the DHCP server and hands the client back its IP (as with any helper address).
    In order for web auth to work, you need to open a browser on the client.
    When you go to a page (say www.google.com) your browser does a DNS query for the IP address of the site (www.google.com), the controller intercepts the query.
    Since you have not been authenticated yet, the controller does not allow the query directly, but it proxies the query to the DNS server you were trying to resolve against. It sources this query from its interface that is on the VLAN the SSID your client is on maps to.
    That reply is proxied back to your computer, and then your browser does its normal request to Google?s IP.
    The controller then intercepts that request, and sends a reply back redirecting the browser to the controller login page (usually https://1.1.1.1).
    Once you log into the web page, you will be redirected back to your original page (www.google.com).
    I hope I explained it well. If I wasn't clear, please let me know.
    -Eric

  • Caching the web pages using an application server...Please help

    Hi all.
    I have an application developed using Struts 1.1 which uses JBoss 4.0.2 as an application server.
    In this application user is required to enter a valid url and my application fetches the web page pointed by this url
    and render the same after doing some pre-processing.
    I want to implement caching of pages on server so that if a different user requests with the same url that was earlier issued, that time my application should render the web page that was cached earlier. (so that i can avoid connecting to that url, fetching the page and further pre-processing).
    One of the way i know is to use "application" object, which can be shared among multiple users.
    Are there any other efficient ways ? What about the performance if i use application object ?
    Please help as i am stuck with this.
    Thank you all..
    Prasad

    Using the application scope is one way to do it.
    I would recommend writing a CacheControl bean to handle this for you (or re-using an existing cache object)
    You can put that bean into the application scope. Just to keep things neat and tidy.
    How that bean then caches web pages is up to you
    - Store them in memory (I would recommend a LinkedHashMap in LRU mode)
    - Store them to disk - less memory intensive, a bit slower but can store more
    How are you going to determine if a page is "the same"?
    I think you should also consider the "no-cache" tags that a page may send with itself.
    Caching can drive web application drivers nuts, as the page actually DOES change on every request.
    Cheers,
    evnafets

  • How to stop the Browser from caching my web pages

    Hi There
    Can anyone tell how to stop the browser from caching my jsp pages
    I am using
    <%response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    but this does not work anduser is able to go back to the previous page
    which i dont want and i want the browser to display the message the page has expired
    Help appreciated
    Thanks
    Mumtaz

    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
    I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
    Srinivasan Ranganathan

  • On a web page when I open a pdf file it says download on the window and then suddenly starts opening multiple firefox blank pages I cant stop it except by using force quit - help

    multiple blank firefox pages open one after the other, can't stop them. only solution is to use "force quit" I am on an iMac. Never had this until today. Has happened now 3 times! its scary/
    == This happened ==
    Just once or twice
    == I clicked to open a pdf file on a web page (i've done this many times before on this web page with no problem) ==
    == User Agent ==
    Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7

    See [[Firefox keeps opening many tabs or windows]]
    You can have infinite tabs opening if you have selected Firefox as the application to handle a file if you get an ''Open with'' download window.
    Firefox should not be selected as the application to handle a file and you have to remove the action that is associated with that file type.
    You can delete [http://kb.mozillazine.org/mimeTypes.rdf mimeTypes.rdf] in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] to reset all actions or set that action in Tools > Options > Applications to 'Always Ask'.
    See http://kb.mozillazine.org/File_types_and_download_actions ("File handling in Firefox 3 and SeaMonkey 2" and "Reset Download Actions")

  • Client machine requires "hosts file" include IP-address of server machine??

    Hi. all.
    I am using real IP address in tnsnames.ora at client machines.
    The client machine(windows)'s hosts file should have ip-address of server machine?
    Without hosts file(ip-address of server), tnsping is always OK, but
    sqlplus returns error from time to time.
    With hosts file(ip-address of server), sqlplus returns no error.
    The database is 2-node RAC database on windows2003.
    Thanks in advance.
    Best Regards.

    If you've got server side load balancing then the clients can get a redirect to one of your RAC nodes when it tries to connect. This redirect will be to a host name (at least thats what I get with our RAC nodes) - so you will definitely need the to be able to resolve the RAC node names. Resolution through the local hosts file or DNS doesn't really matter.
    Ahmed

  • Do I need install web analysis on client machine?

    I have installed web analysis in the server, to let the user to access web analysis, should I also install web analysis in the user's machine, or just let them access the web analysis URL, http//hostname:16000/webanalysis ?

    They should really access through the workspace port :- http://hostname:19000/workspace/index.jsp login and then access WebAnalysis via workspace
    or http://hostname:19000/WebAnalysis/WebAnalysis.jsp
    It should automatically download the java client if the user does not have it installed.
    If a JRE is not installed it should deliver jre-1_5_0_17-windows-i586-p.exe
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Should the web page address be included in the file name in the meta data dialog box?

    In the page properties > meta data > below is a field with the label file name: (the the area to type in the field), after the field, it is labeled .html.
    I have 2 questions here.
    1. If I type in http//:www (my page url), do I include .html at the end? I didn't know if this is automatically added because it is off to the side of the field?
    2. If I type in the entire URL address: http//:www (etc, etc).html,    after closing the page properties dialog box, I make it a habit to double check my work. What happens is the http//:www.xxx changes to (htttpwww.xxx). It drops the //: on the URL.
    So would it be better to just type in www.xxx (without the http//:www.xxx)
    and do you type in the .html at the end?
    I am assuming this will help with SEO page ranking or at least makes it easier for the search engines to crawl your site??
    I hope this makes sense.
    Advise would be very helpful.
    Ben

    You are absolutely correct with the URL Ben. Taking your above example, you just need to type in "Services" in the file name and the webpage will be exported as services.html and the URl will be  www.xyz.com/services.html.
    All the webpages (be it parent page or child page) gets physically saved at the root directory of your website on the server (where your website resides).
    This name is just the name of the file using which it is physically stored and called from the server. It does not help search Engines to crawl deeper inside the website.
    As I explained, "name which you wants the .html file to be stored with" here means the name of the physical file which is getting saved on the server.
    Most users leave the file name same as Page name. If you have it different from page name then this will be the workflow :
    Page Name : About
    File Name : test
    domain : www.mysite.com
    Now if you are  using a Menu Widget, it will list "About" in the Menu. And when end user will click on "About" then it will call the file named "test.html" from the server location (where all the files of your website are stored).
    And it will open a page with address "www.mysite.com/test.html"
    Hope I am able to explain the concept of File Name here. Please let us know if you have further queries on this.
    Regards,
    Sachin

  • Print web page to PDF with date as file name

    Hi
    I'm doing environmental monitoring for a construction project and i need to download the 5 day forecast from a particular web site daily. I'd like to automate this to happen at 7 am every day. I've tried record but am having problems.
    Here are the steps i'd like it to take:
    1. Open book mark in Safari
    2. Open print dialog (command p)
    3. Open save to PDF
    4. Select folder in finder
    5. Enter current date as file name
    6. Save pdf file.
    I've tried Get Specified URL and nothing happens. When i record the mouse always misses.
    Help

    Hi... had to put this up for a while as I got busy in my day job. Here's where i'm at
    I can successfully generate a PDF file but it's blank. The other two problems I'm having is that I'd like to name the file with the current date. I can call up the current date using that tool but i can't figure out how to make it the file name whether i print to pdf or use the tool.
    I think there's something i'm missing here.
    Message was edited by: Gary Springs

  • Safari Will Not Show Any Cached Web Pages From Any Website.

    Basically my problem is exactly as stated in the heading. Any web page I try to view a cached snapshot of returns: "Your search did not match any documents." Up until a week or so ago, I could cache any web page, unless it truly was to old to display a cached snapshot. It would never highlight the key words typed in the search bar when the cached option was selected, but it always showed the page. Now it will not cache any page.
    The links are not broken, because I can search every page from my desktop computer with no problems. It's only on my iPhone. I could try to view 5,000 cached web pages, and every one of them returns the same message: "Your search did not.....". I've cleared my history, cache, cookies, as well as log off, and power down the phone, and turn it back on. Nothing fixes the issue. I have the latest update, and have no other problems with my phone at all. Has anyone else had this problem? Any solutions? This is very frustrating. A google search turned up nothing. This has to have happened to more people than just me. Hopefully I don't have to use the cache feature to find the answer:)

    I guess I'll join another forum, were there's people smart enough to help.

  • Cannot open pdf from a link in web page

    Hi,
    I have a link in a web page that gets a Blob(pdf file) from Oracle database and returns the pd file.
    The code in my jsp is :
    // I got this from an Action (I�m using Struts)
    java.sql.Blob file=(java.sql.Blob)request.getAttribute("PDFfile");
    String filename=(String)request.getAttribute("filename");
    try{
      int iLength = (int)(file.length());
      response.setHeader("Cache-Control","no-cache");
      response.setHeader("Content-Disposition", "attachment; filename=\""+filename+"\"");
      response.setContentType("application/pdf");
      response.setContentLength(iLength);
      ServletOutputStream os = response.getOutputStream();
      InputStream in = null;
      in = file.getBinaryStream();
      byte buff[] = new byte[1024];
      while (true) {
         int i = in.read(buff);
         if (i<0) break;
           os.write(buff,0,i);
      os.flush();
      os.close();
    } catch(Exception ex){
      out.println("Error while reading file : " + ex.getMessage());
    }When I click the link, a popup windows asks if I want to save the file or open it. If I save it, there is no problem, I can open the file and see the content but if I try to open the content, I get an error in Acrobat Reader ("error opening the document.File not found"). Does I need to have a "physical file" to be able to open it ?
    Another question : What I have to do to open the pdf file in the browser and not in the acrobat reader ? I have IE 6.0 and acrobat reader 6.0. Doeas I need to put some pluggin in IE ?
    Thanks !

    // I got this from an Action (I�m using Struts)
    java.sql.Blob file=(java.sql.Blob)request.getAttribute("PDFfile");
    String filename=(String)request.getAttribute("filename");
    try{
      int iLength = (int)(file.length());
      response.setHeader("Content-type", "application/pdf");   
      response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"");
      response.setHeader("Expires","0");
      response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
      response.setHeader("Pragma","public");
      response.setContentLength(iLength);
      ServletOutputStream os = response.getOutputStream();
      InputStream in = null;
      in = file.getBinaryStream();
      byte buff[] = new byte[1024];
      while (true) {
          int i = in.read(buff);
          if (i<0) break;      
          os.write(buff,0,i); 
      os.flush();
      os.close();
    } catch(Exception ex){
       out.println("Error while reading file : " + ex.getMessage());
    }and now it�s running !!! I�m not using response.setContentType(...) and I do this in response.setHeader("Content-type", "application/pdf"). And I use response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"") instead of response.setHeader("Content-Disposition", "attachment; filename=\""+filename+"\"");

  • Getting the newest version of a web page in Safari

    My version of Safari does not look for updated versions of websites I frequently visit. It always loads what's in the cache. Is there a setting somewhere that forces it to always load the page from scratch or at least every session?

    In my experience, Internet Explorer is much worse about caching stale web pages than Safari. (As an example, I often have to tell people in my workplace to restart their PCs in order to see a web page change in Windows Internet Explorer, while I can see the change in Safari without a problem.)
    However, the problem can be confused by things that a network (in a workplace, in particular) do in terms of web access, and also by caching that your ISP might be doing, as QuickTimeKirk mentioned. If your ISP is "feeding" you a cached page, your web browser really can't load the refreshed page until the ISP itself refreshes the page.

Maybe you are looking for

  • Understanding the way to connect a MDD to BlackMagic Decklink Extreme card

    Hi, I require some help in the following: I recently bought myself a Blackmagic DeckLink Extreme™ with 10bit SDI/analog video and audio capture card. Looking at the specs, http://www.blackmagic-design.com/products/sd/specs/, can someone give me direc

  • Database Login Prompt in Deployment PC

    Hi, I had developed a WinForm App using VS C# 2008, CR Basic for VS 2008, and SQL Server 2005 Express. For the crystal report, I can view it through report viewer without problem in development server, but in deployment/client PC without development

  • Re-create Tree control drag and drop move

    Hello, Ive got a tree control where dragEnabled=true and I have custom handlers for dragEnter, dragOver, and dragDrop so that I can drag/drop from datagrid's to the tree and it works fine. The issue is now the built in tree functionality for moving n

  • WMA format and iTunes

    Greetings: I am trying to download audiobooks from the Riverside County Librrary. The Help person sent this to me. Quote "Note: You cannot listen to an eAudiobook in protected WMA format in iTunes."unquote. I have iTumes 10.1. If iTunes can;t open WM

  • Procedure of Return of subcontracted materials

    Dear Expert, we are using subcontracting procedure in our company,sometime material provided by subcontractor is faulty this material we want  return to subcontractor..how to do ? Thanks