I create the class Video.
in the first servlet, I create several Video objects and put them into a Vector object, and then put the Vector object into the servletContext;
in the second servlet, I get the Vector object from the servletContext,it is okay, then when I get the Video object from the Vector and cast them back to Video, the run time exception raises.
Who chould tell me why?
following is the error message on the browser:
java.lang.ClassCastException: Video
at AddVideoServlet.doGet(AddVideoServlet.java:28)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source)