vrussell

Greenhorn
+ Follow
since Jun 04, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vrussell

I want to ask if the jsp's session is generated when a request is raised ?
if the browser doesn't support cookie, will the server generate a session too?
thank you for helping me!
21 years ago
JSP
Hello,
I encounter a problem related to JTable.
If I right click the JTable, a popup menu will appear, it has three choices(Show Column, Hide Columns,Go to Row).If there may many columns on the table (such as 30), then if i choose Hide Column, the popup window will not high enough to show all the column names. Can I add a scroll bar to the popup window?
Who could tell me how to do it??
Thanks
Russell
22 years ago
Hi, Maulin,
Thank you very much for you help and the detailed explanation!!
I try
System.out.println(( o instanceof Video) ? o.getClass().getName() : "Not matching instance for casting");
It shows Video.
Then that means o is an instance of Video, but the run time cast exception still raise.
I try to place "put" and "get" in the same servlet(put the vector into the servletcontext and get the vector back from the servletcontext), it is okay. quite a strange thing!
Do you encounter this problem?
Yours
Russell
22 years ago
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)

22 years ago