Click here to Skip to main content
15,885,244 members
Home / Discussions / Java
   

Java

 
Questionjava Pin
Member 107878361-May-14 2:14
Member 107878361-May-14 2:14 
AnswerRe: java Pin
Richard MacCutchan1-May-14 5:34
mveRichard MacCutchan1-May-14 5:34 
Questionplease reply as soon as possible Pin
Member 107875691-May-14 0:36
Member 107875691-May-14 0:36 
AnswerRe: please reply as soon as possible Pin
Richard MacCutchan1-May-14 0:50
mveRichard MacCutchan1-May-14 0:50 
GeneralRe: please reply as soon as possible Pin
Member 107875691-May-14 17:59
Member 107875691-May-14 17:59 
GeneralRe: please reply as soon as possible Pin
thatraja1-May-14 21:00
professionalthatraja1-May-14 21:00 
AnswerRe: please reply as soon as possible Pin
Member 1026233013-May-14 21:41
Member 1026233013-May-14 21:41 
QuestionIE not getting refresh to show the latest changes--spring MVC,jsp Pin
swarjava30-Apr-14 8:06
swarjava30-Apr-14 8:06 
XML
am using spring MVC and jsp for developing the application. I have a scenario in which I can create or delete a record. index.jsp is the main page where users can see all the records, from there we can create or delete the record, once created or deleted the controller comes back to the same index.jsp with latest changes being shown on the page. Issue is its working fine in FF and chrome but in IE, if I want to see the latest added record or remove the deleted record from the list, I have to close the browser manually and reopen it. I have tried all possible response.setHeaders..to remove the cache in IE. The other approach I tried is to redirect the spring controller, but still IE is not refreshing and not showing the latest changes in index page. Code is as below:

  <pre lang="java">@RequestMapping(value = "/createRequest", method = RequestMethod.GET)
        public ModelAndView createRequest(final HttpServletRequest request,
                final HttpServletResponse response,..)
        //logic to create or delete record..
                return new ModelAndView("redirect:myredirectPage.htm");
        }

        @RequestMapping(value="/myredirectPage", method=RequestMethod.GET)
        public ModelAndView showMyRedirectPage(){
           ModelAndView modelView = new ModelAndView("index");
           return modelView;
        } 

I have added no cache tags in index.jsp as well as create.jsp where we will create the record. Below is the code i kept in jsp: index.jsp:

HTML
<%
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", -1);
    %>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
 <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
   ..

    </html>

create.jsp:

HTML
<%
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", -1);
    %>
    <!DOCTYPE HTML>
    <head>
    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="Expires" CONTENT="-1">

    <%@page isELIgnored="false" %>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@page import="java.util.Date" %>
    ...

Thanks.
AnswerRe: IE not getting refresh to show the latest changes--spring MVC,jsp Pin
Prasad Khandekar14-May-14 3:13
professionalPrasad Khandekar14-May-14 3:13 
QuestionGet data from database Pin
Ravi900kumar29-Apr-14 8:48
Ravi900kumar29-Apr-14 8:48 
QuestionRe: Get data from database Pin
Richard MacCutchan29-Apr-14 20:32
mveRichard MacCutchan29-Apr-14 20:32 
AnswerRe: Get data from database Pin
Tom Marvolo Riddle29-Apr-14 23:07
professionalTom Marvolo Riddle29-Apr-14 23:07 
QuestionNeed help on "Competition Scheduling" Algorithm Pin
N.Wang29-Apr-14 7:11
professionalN.Wang29-Apr-14 7:11 
SuggestionRe: Need help on "Competition Scheduling" Algorithm Pin
Richard MacCutchan29-Apr-14 20:31
mveRichard MacCutchan29-Apr-14 20:31 
QuestionHSQL where clause Pin
Nico Haegens29-Apr-14 6:43
professionalNico Haegens29-Apr-14 6:43 
AnswerRe: HSQL where clause Pin
Richard MacCutchan29-Apr-14 20:29
mveRichard MacCutchan29-Apr-14 20:29 
GeneralRe: HSQL where clause Pin
Nico Haegens29-Apr-14 20:59
professionalNico Haegens29-Apr-14 20:59 
GeneralRe: HSQL where clause Pin
Richard MacCutchan29-Apr-14 21:07
mveRichard MacCutchan29-Apr-14 21:07 
GeneralRe: HSQL where clause Pin
Nico Haegens29-Apr-14 21:18
professionalNico Haegens29-Apr-14 21:18 
GeneralRe: HSQL where clause Pin
Richard MacCutchan29-Apr-14 21:23
mveRichard MacCutchan29-Apr-14 21:23 
QuestionJava file reading Pin
monikanchan28-Apr-14 18:17
monikanchan28-Apr-14 18:17 
GeneralRe: Java file reading Pin
Richard MacCutchan28-Apr-14 22:31
mveRichard MacCutchan28-Apr-14 22:31 
AnswerRe: Java file reading Pin
Doan Vu6-Jun-14 17:03
professionalDoan Vu6-Jun-14 17:03 
Questionget value inside array list in specific order Pin
sunil khichar28-Apr-14 7:36
sunil khichar28-Apr-14 7:36 
AnswerRe: get value inside array list in specific order Pin
jschell28-Apr-14 8:07
jschell28-Apr-14 8:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.