Click here to Skip to main content
15,905,563 members
Home / Discussions / Java
   

Java

 
AnswerRe: JChomboBox Pin
TorstenH.9-May-14 4:35
TorstenH.9-May-14 4:35 
GeneralRe: JChomboBox Pin
Kokkula9-May-14 19:27
Kokkula9-May-14 19:27 
GeneralRe: JChomboBox Pin
Richard MacCutchan9-May-14 21:41
mveRichard MacCutchan9-May-14 21:41 
QuestionHELP Pin
Member 107983016-May-14 1:40
Member 107983016-May-14 1:40 
SuggestionRe: HELP Pin
Richard MacCutchan6-May-14 6:00
mveRichard MacCutchan6-May-14 6:00 
GeneralRe: HELP Pin
Member 107983016-May-14 7:08
Member 107983016-May-14 7:08 
GeneralRe: HELP Pin
Richard MacCutchan6-May-14 9:06
mveRichard MacCutchan6-May-14 9:06 
AnswerRe: HELP Pin
TorstenH.6-May-14 21:26
TorstenH.6-May-14 21:26 
QuestionHow to Pin
mtouxx5-May-14 19:49
mtouxx5-May-14 19:49 
QuestionRe: How to Pin
Richard MacCutchan5-May-14 20:39
mveRichard MacCutchan5-May-14 20:39 
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 

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.