File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes HELP into JSp (Code works fine with NS but not with IE5.0) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HELP into JSp (Code works fine with NS but not with IE5.0)" Watch "HELP into JSp (Code works fine with NS but not with IE5.0)" New topic

HELP into JSp (Code works fine with NS but not with IE5.0)

Sanjay pts
Ranch Hand

Joined: Nov 07, 2000
Posts: 357
I have a problem,
This complete code is written into single jsp files.
I have chose one customer into drop-down List, and accordingly onchange of that drop-down list i called one java script function in which i retrive the code of that customer and call document.location.href="same jsp", so it will call the same jsp and with selected customer code i can retrive data from data base and assing it to different fields.
Now the problem is suppose i have a two customer and i choose one customer first and then second ok. So in this case it will call same JSP ,and assgined data accordingly (uptil this it works fine), but if i choose again the first customer it will take the data from temp files, which has been priviously printed (This i have seen by printing System.out.println using). Because of this problems the updation i have made is not reflected into perticular fields and take previous data first time.

This code works fine with Netscape4.6 but it will give an error with IE5(because it will consider earlier code), so how should i refresh this things.Is there any methos available which call JSP everytime and not take data from temp folders(methods into javascript as well as into JSp)???.

If u r not getting me just let me know which part u didnt understand.
Thanx patel.

Eat JAVA, Drink JAVA, Sleep Java
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
It sounds like one browser is caching the old page - I saw a note the other day that suggested the following is the way to prevent that:
String tmp = request.getProtocol() ;
if (tmp.equals("HTTP/1.0")) {
response.setHeader("Pragma", "no-cache");
} else if (tmp.equals("HTTP/1.1")) {
response.setHeader("Cache-Control", "no-cache") ;

It is sorta covered in the JavaRanch Style Guide.
subject: HELP into JSp (Code works fine with NS but not with IE5.0)
Similar Threads
Problem with ADF Faces table component and Paging
Reg : Drop-down box
how to do readonly lists in jsp
Help ...Dynamic Drop Down list
error showing while retrieving the data from drop down list