Lucas Lee

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

Recent posts by Lucas Lee

To handle this kind of problem , the most simple way is to use a thread-safe collection class , such as Vector instead of ArrayList.
18 years ago
This is a strange problem, If you tried my solution and still failed.
I'll advise you to confirm your browser enabled cookie functionality.
Or, you should test it using another browser for confirming this problem is not relative to browser.
18 years ago
JSP
I have a very simple solution to your situation, although it's not perfect.
Use a index.jsp as your web application welocome page, then redirect to your frame set page, so that it doesn't change your application behavior while make sure that create one single session before accessing frame set page.
18 years ago
JSP
You should mean the server.xml of Tomcat , this file is define parameters for tomcat, while web.xml is difined in J2EE spec and for portable web application.
18 years ago
I recommend you to using connection pool such as DBCP in tomcat.
I know there are some useful features in DBCP such as helping programmer to locate the exact code line that open database connection without properly closing.

It help you gain a easier life...
Good luck!
If you have MS visual studio.NET, or some equivalent Javascript debugger,
you can debug your error easier.
Yes, of course everyone should learn the theory by using Notepad to code in Java.
But after this phase, everyone should using a comprehensive IDE for better productivity either...
18 years ago

Originally posted by Peter Chase:


Yes, but that is generally not in combination with an abstract class, which is the specific topic we're discussing here.



Yes, you're right.
18 years ago
It seems you want to do all things right at your first time.
It's not easy or good, you know.

The J2EE patterns have little relation to GOF patterns. So you can learn them respectively.
But GOF patterns are most popular, important, classic things you should learn them after several years experience of programming.

For a web application, you can achieve it without any patterns, and of course can do it with a lot of patterns ,this's not certain.
But I think most dangerous things is using patterns you don't grasp.
[ January 15, 2007: Message edited by: Lucas Lee ]
You should check the JDK API document for these two classes first.
The major difference is Vector is not synchronized while ArrayList is synchronized. That is, for more often situation, you should use ArrayList for better performance.
18 years ago
Why don't you google it first?
This is a simple question.
If you really need read so big file, you can set the JVM parameter "-Xmx" to enlarge the maximum memory usage. The default value is 64M, it seems too small to your situation. You can see the parameter desciption in JDK document.
18 years ago
I think the most famous usage of private constructor is to implmenting a singleton .
18 years ago
Use Base64 or other similar encoding algorithm.
But you need pay attention to that encoding will enlarge the file size to 1.33 times.
18 years ago
Using getClass().getName() will work.
But I still wonder if you are trying to use a wrong way ,if you should implement some logic in every child classes rather than do it using reflection.
18 years ago