1. java.lang.classFormatError: Bad magic number at offset=0
probable cause: deploying a corrupted jar file.
When you create a jar file using command jar -cf and if by chance you forget to specify the name of jar file, then the classes are corrupted you have to recompile the classes and again create the jar file.
2. Ajax response getting cached.
On using below code I observed that servlet was hit only once, the reason being that the response is cached by IE
xmlHTTP.open("GET" ,"../servlet/MyServlet", true);
xmlHttp.send(null);
hence when using "GET" method in ajax request, (based on your requirement i.e if you do not want the browser to cache your response) set the
response.setHeader("Cache-Control", "no-cache");
in your server side code, in this case servlet.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment