Thai C. Tran

Greenhorn
+ Follow
since Jul 05, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Thai C. Tran

ok. Problem solved ! I just checked out the source code of jstl and realize that they use StringTokenizer (!!!). Better to make a custom tag
11 years ago
JSP
Sorry, it was supposed to be

11 years ago
JSP
Maybe I am missing something, but can anyone explain to me why the code

print out the value "abcdefgh@@" instead of "abcdefgh@@INTERNAL_SPLITTAG@@VG@@INTERNAL_SPLITTAG@@a" ???!?!?!?
11 years ago
JSP
Sorry, I didn't make the question clear. As the title said, it is possible to leak; but actually, it is not . I have checked all the connection handling and cannot find anything wrong with it. After using yourkit tool (it allows to check the heap space continuously with the force GC running function), it turned out that because we are using thread in order to run that function, the heap space keeps increasing so fast but the GC cannot run fast enough to free the unused memory. So, what I did is trying to clear the session when possible (after each thread) and the most important thing is using this suggestion. The test case passed even with the 64 MB.

Thank for your time
Hi all,

I have recursion function, which access to the database through hibernate 3 in order to count all the members of a directory. Here is the code of the function



And here is the code for DirectoryEntity implementation


And for the findbyId function



everytime the function is finished, the memory is increased significantly and objects in the heap is not garbage collected. I tried to use MAT to use analyse the problem (please see the attachement). It looks like I have a issue with opening/closing transation but still have no idea how to fix it. Can anyone have any suggestion, please? Please ask more code if necessary
I 've been searching the solution for this problem quite long but cannot find any good answer for it. Most of the answers i got lead to the way of using ActiveXObject, which is not suitable for the linux platform (or any platform except window). Can anyone confirm about this problem cannot be solved with only javascript? Because i think i gonna make an applet for it now.

Thanks
Dear all,

I got a popular error (org.apache.coyote.http11.Http11NioProtocol initializing endpoint) when running tomcat (6.0.32) with SSL certificate (.pfx). This is my configuration in the server.xml



I could solve the problem by changing the protocol into "org.apache.coyote.http11.http11nioprotocol". However, i still have no idea why is that? This bug only happen with 6.0.32. With the version 6.0.33, the old configuration works well





13 years ago
I am developing a cryptography app by using java. In the end of the process, password from user is encrypted and added with some other parameters and meta data into an object, which will be saved into file for the later usage. Therefore, leaving some footprints in the final file is not good. The file will be also read by another program (in C++), so the structure of the file is fixed as well. The content of the object is correct right now, except when being converted into byte array, Java automatically add more information into the final data
13 years ago
Dear all,

I use the code below to write object into file. However, in the final file, i also have the class name and the signature of the class. Due to the security problem, i want to get rid of them. How can I implement it in Java ?


13 years ago
Thanks all for your kindly replies. I know what i should do now

@Jesper de Jong : It is really a security-related application
13 years ago

Campbell Ritchie wrote:Depends whether you are happy with the SecureRandom and Random classes.



Awesome ! I never known about the SecureRandom class before. Will have look at it now. Thank you very much
13 years ago
Hi all,

I am porting a program from C++ into Java. In the C++ program, there are a small function to make a good random number by declaring a loop with the limited value based on the time scaled back to range from 0 to 127 to run the rand () function. After that the final number will be make by using some formulas with the rand() function again. So, my question is, do i have do the same in Java?
13 years ago
ha ha. it is an online testing system. Nothing nasty here :d
14 years ago
Hi all,

I need to make a program (by using Java) that when opened, user cannot switch to any other programs and do anything else (connecting to usb, ...) except interacting with my program. This is only the first stage of the development so i do not have a clear idea about what technique i will use. Window hook looks promising but i am not so sure whether i am on the right direction or not. Do you have any suggestion for this?
14 years ago