File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes problem with cache!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem with cache!!" Watch "problem with cache!!" New topic

problem with cache!!

kapil bhate

Joined: Mar 04, 2004
Posts: 15
I write jsp and access through browser ,if i make any changes & refresh that browser it has 'class cast exception' has cache problem when i delete it from cache then no problem how can i recover from this?can i write some code in my jsp so that cache problem never face?please help
thanks in advance
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

Use this in your JSP

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

I know of no circumstances where caching can cause a ClassCastException. There's something else at play here. More info will be needed to diagnose the problem.

[Asking smart questions] [About Bear] [Books by Bear]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Most likely you are trying to reference something in your cache that's either not there or a different type from what you expect.

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
Once i faced the problem of server(tomcat) using older version of jsp, i.e. my changes didn't reflected. All i did was deleted its work folder, so that it uses latest version of jsp. All servers have a folder where they keep compiled .class files and .java files for your jsp. Just try to delete that folder, and see if it works.

<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
I don't know how this client side script will prevent any server side exception?

Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
brad balmer
Ranch Hand

Joined: Mar 08, 2004
Posts: 57
If you are still having this problem a stacktrace would be helpful to figure out what the issue is.
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Sometimes, the .class files compiled for JSP may not be recompiled when changes made and the client sent the same request.
To play save, try remove all related .java and .class files to make sure that the changes are made effective.

SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
I agree. Here's the link:
subject: problem with cache!!
jQuery in Action, 3rd edition