Win a copy of High Performance Python for Data Analytics this week in the Python forum!

Wong KK

Ranch Hand
+ Follow
since Jan 15, 2001
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 Wong KK

I am using Apache1.3.20 with mod_ssl + tomcat3.3 + mod_jk + Solaris 8 + Jdk1.2.2(green threads)
I have a simple web application in tomcat.
Using apachebenchmarking tool (ab) to generate many requests to my application via apache, I find that the
allocated java heap continuously increases.
On the other hand, generating many requests to my application directly to tomcat, I find that the allocated java
heap remains unchanged.
I change my application to a simple jsp. The above scenarios still exists.
Can anyone tell me why?? Have I set anything wrong in apache or tomcat??
Thx. and Regards.
Steve.
18 years ago
I have a web application running on Apache1.3.20 with mod_ssl+Tomcat3.3+Jdk1.2.2 on Solaris 8.
The allocated heap size of tomcat continuously increase until OutOfMemoryError occurs.
I've used OptimizeIT Profiler to monitor it and discovered that four classes' object instances
continuously increase. They are :
org.apache.tomcat.util.buf.CharChunk
org.apache.tomcat.util.buf.ByteChunk
org.apache.tomcat.util.buf.MessageBytes
org.apache.tomcat.util.http.MimeHeaderField

Do anyone have similar problem and know how to solve it, please throw me some light.
Thx. in Advance.
19 years ago
I have Catalina installed and can run the example servlet.
However all the example jsp are not running. There are no error messages in the log files.
The browser didn't complain but returned
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"></HEAD>
<BODY></BODY></HTML>
No matter what the jsp is. The return is the same as above.
I can see there are files like this. e.g. the jsp file is a.jsp. There is a$jsp.java and a$jsp.class in the work
directory.
What have I set wrong??
Thx. and Regards.
Steve.
19 years ago
Yes, you are right.
e.g.
String[] a = {"abc", "cde"};
Then 3 objects are created.
That means : yield may put a thread on hold or may not??
It depends on the thread scheduling algorthmn the JVM is using?
I've just cleared SCJP and I am thinking which path should I go?
Can someone give me suggestion?
SCJP -> Test486 of IBM -> ..... (details in www.jcert.org)
SCJP -> SCJD -> Sun Cert Architect ..
Sweekriti is right.
So we cannot specify any extends or implements clause.
Oh I see. Thx for Everybody. Let me summerize as follows:
Question 54 from JvalTest:
Which of the following is true about static modifier.
A. static can be applied to : instance variables, methods, code Segments and classes
B. a static method cannot be overridden.
C. inner classes can be both static & private.
D. a static reference cannot be made through non static method or code block
E. abstract & static both can be applied together to a method.
A is wrong because static can't be applied to classes
B is correct because you can only hide but not override a static method
C is correct because there's nested class
D is correct because of the word 'MADE'
E is wrong because abstract and static cannot be used together.
simply use LocalclassDemo.classvar
This question drops in what construction statement means?
Is construction statement means : new Thread()??
or means the constructor of Thread class??
At compile time, object reference type will be checked rather than the actual type for the object.
As you say, then
String s = "123" + "456";
there's 3 object created??
I haven't purchased JQ+.
But I think you should run it by:
java -jar xxx.jar
Question 38: What does the following code do? File f = new File("hello.test");
FileOutputStream out = new FileOutputStream(f);

Select the one right answer.

A. Create a new file named "hello.test" if it does not yet exist. The file is not opened.
B. Open a file named "hello.test" so that you can write to it and read from it, but does not create the file if it does not yet exist.
C. Open a file named "hello.test" so that you can write to it but cannot read from it.
D. Create an object that you can now use to create and open the file named "hello.test," and write to and read from the file.
Correct Answer is A. But I think the correct answer is C.
Correct me if I am wrong.
Question 54 from JvalTest:
Which of the following is true about static modifier.
A. static can be applied to : instance variables, methods, code Segments and classes
B. a static method cannot be overridden.
C. inner classes can be both static & private.
D. a static reference cannot be made through non static method or code block
E. abstract & static both can be applied together to a method.
Correct Answer is B, C and D.
But I think the correct answer is A, B, C and E.
A is correct because applying static to an instance variables make it become static variables and there's static method, static initializer block and nested class.
D is wrong because you can always refer to a static variables from an instance method.
E is correct because interface method is of public, static, abstract
Correct me If I am wrong.