WiLL Tao

Ranch Hand
+ Follow
since Dec 14, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by WiLL Tao

Originally posted by jrookie:
need help with server.xml in tomcat4
in tomcat3 servlets with database works
but not in 4
any have solves in JDBCRealms ???
thanks



HI,jrookie .
I don't think JDBC with tomcat need any
especial configuration.
just copy your jdbc drivers in TOMCAT_HOME/COMMON/LIB, restart tomcat,done.
Hope it helps.
22 years ago

Originally posted by Mark Leong:
I am using servlet to generate a table:-
out.println("<form>");
out.println("<table width=200>");
do something here......
out.println("</table>");
out.println("</form>");
Somehow the width=200 does not seem to work.
When I use pure html, it works perfectly.
Anybody has the same experience?


out.println("table width='200'");
-----------------
hope it works
22 years ago
Easier than mock,
Many thanks to Valentin ,Rob,Corey and other Ranchers.You ROCK!
[ April 27, 2002: Message edited by: WiLL Tao ]
22 years ago
Calling the setPriority method on a thread objectcan directly cause a thread to stop executing?
And exiting from a synchronized block can cause a thread to stop executing?
I'm confused.Thanks for any help.
Hi,Dave;
I searched this question before(found some similar questions and no exact same question)
and still confused.
Now i will try again now,Thank for suggestion.
Though long and float all 32bit,but they use different structure.
So float is 'big' than long.
Hope it helps.
My question is
"Is it OS depended?"
eg:If in an Time Slice ystem
When executing

then SYSTEM switch to another thread,

after some time,then it switch to main thread,

now main thread terminate,switch to TestClass thread,infinite loop....
So the answer should be :
1,2,4;
Am i right?Thanks.
which two cannot directly cause a thread to stop executing?
A.calling the yield method
B.calling the wait method on an object
C.calling the notify method on an object
D.calling the notifyAll method on an object
E.calling the start method on another thread object
---------------------------------------------
Here is my explain,Please correct me,Thank you!
A>>>.if there is same priority thread, then A is correct.
B>>>Always correct.
C,D>>>Don't know. Semms also wrong.
E>>>Wrong.Depended OS and JVM.
Please attach your explain,thanks.
BTW:Seems thread is very hard to me,which in important part of thread in SCJP2 Test?
Is that mean in test,if be asked to pick up reserved words,then only goto and const should be correct answer?
Just like this question:
what is reserved words in java?
A. run
B. default
C. implement
D. import
Thank for suggestion.
Some class override the equals method, so it compare the vale,eg:String class
JAVA DOC
Overrides:
equals in class Object

The interesting is that StringBuffer does not override equals meothd.
Please look this code

Hope it helps.
Now the equals method is only SHALLOW compare.
It only compare the hasocode of object(usually memory address).
MyClass a and MyClass b both use new keyword for creating, they have different hashcode,so "Objects have different values" will be printed in the end.
Hope it helps.
[ April 21, 2002: Message edited by: WiLL Tao ]