• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with cache!!

 
kapil bhate
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I write jsp and access through browser ,if i make any changes & refresh that browser it has 'class cast exception' ie.it 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
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use this in your JSP
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
brad balmer
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are still having this problem a stacktrace would be helpful to figure out what the issue is.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Nick.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic