File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Browser cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Browser cache" Watch "Browser cache" New topic
Author

Browser cache

sreedhar Lackka
Ranch Hand

Joined: Jul 05, 2008
Posts: 154
Hi All,
Thanks a lot in advance.
We are developing one application in J2EE with Struts.
We are getting some different problem, some times data is not dispalying on the page.However after deleting browser cookies and offline content it started
displaying data.
Dont know what to do?
Please help me.

Regards,
Sree
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
It looks like there is a bug in the presentation code that displays the data on the page. You need to analyze this code and figure out why the data does not display on the page everytime.

Also, you should test presentation code with various web browsers, e.g. Safari, Navigator, Firefox, etc.
sreedhar Lackka
Ranch Hand

Joined: Jul 05, 2008
Posts: 154
Thanks for your reposnse.
I tested the same on Mozilla there is no problem at all.
do we need to do any browser specific program. Like no-cache.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Data not displaying on the page is the problem. The presentation code should not be dependent upon anything in a client HTML broswer. If there are any dependencies, then you should remove them. Content in a browser's cache is not "preventing data from displaying on the page."

It seems, the root cause of the probelm is not browser cache, it is the code. If a browser has cached data for a page, then it should display the cached data. Regardless of whether there is cached data or not, the presentation code should display data on the page everytime the page is requested from the server.

There are HTTP headers that can indicate how a browser should treat the page contents. You can set these in the HttpResponse object. However, this is treatment of "symptoms" of a problem, and not a solution of the possible code bug(s) (root problem). Also, there is no guaranteed behavior in the browser when including these headers. Each browser may handle them differently or ignore them all together.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Browser cache
 
Similar Threads
ServletOutputStream
jsp beans
Detecting multiple browser windows
Do you encrypt password yourselves?
Lunching MS Word from jsp