Results 1 to 4 of 4
  1. #1
    Tokajac is offline Member
    Join Date
    Jun 2008
    Posts
    13
    Rep Power
    0

    Default Why is Refresh neccessary after loading the page?

    Hello!


    I'm creating a server.
    When I want to reach new page I get the proper content in the browser, BUT in text format. I'm using OutputStream's methods write, flush, close...
    After that, when I click F5 (Refresh), page loads properly.

    Any (theoretical) ideas?


    Regards

  2. #2
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

  3. #3
    Tokajac is offline Member
    Join Date
    Jun 2008
    Posts
    13
    Rep Power
    0

    Default

    Here is the header:
    Java Code:
    GET /index HTTP/1.1
    Host: localhost:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: SESSc8fe9b3d31081829952634472ad12511=35174c93cc003dc762386613bdefd0c1
    I get suspicion on no-cache headers. How/where should i fix this?


    Regards

  4. #4
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

    Default

    have you code something like
    Java Code:
    response.setHeader(String, String);
    ...
    
    response.setContentType(String);
    				
    response.setContentLength(int);
    		
    out = response.getOutputStream();
    xxx.wrtieTo(out)
    out.flush();

Similar Threads

  1. refresh the jsp page(ajax)
    By lukky in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-28-2008, 10:17 AM
  2. i need to refresh the page again?Help needed
    By 82rathi.angara in forum New To Java
    Replies: 2
    Last Post: 07-29-2008, 02:58 PM
  3. warning that page has expired and i need to refresh the page again
    By 82rathi.angara in forum JavaServer Pages (JSP) and JSTL
    Replies: 5
    Last Post: 07-15-2008, 02:48 PM
  4. Refresh the page
    By udhayageetha in forum AWT / Swing
    Replies: 2
    Last Post: 07-01-2008, 10:03 AM
  5. How to Refresh the same page by JSP
    By AbuAziz in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 12-10-2007, 05:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •