Monday, September 6, 2010

Clone machine in VirtualBox

VBoxManage clonevdi srouce_vdi dest_vdi

After clone vdi, you can create new machine with mount new vdi position.

You can change hostname using:
nano /etc/hostname

or using

sysctl kernel.hostname newhostname

after clone and change hostname, you maybe face some problem about NICs, please remove old configs of NICs

rm /etc/udev/rules.d/num-persistent-net.rules

Tuesday, October 20, 2009

Create auto id toplink

@Basic(optional = false)
@Column(name = "testid")
private Long testid;

Create sequence type in Postgres named testid_seq, then modify above code in generated code of entity

Tuesday, July 21, 2009

Search package from lib

apt-file search lib_name

To check reference lib, using:

ldd -r lib_path

Tuesday, July 7, 2009

Nightmare ICEFaces!

I used ICEFaces framework to develop business web application.
My project completed 70%, ICEFaces alert update up to version 1.8.1 and stupidest that happened!!!

I updated to 1.8.1 without backup current my web, very risky. Finnaly, my web has some bugs that I can't know and investigate. I tried many times, it spended more time to analysis but everything seems want to against me. I am very disapoint about ICEFaces.

Today, try again, I continue go with another way to solve that problem, haha, thank my God, I suddenly find right solution, that downgrade and upgrade again. Wonderfully, it can fix itseft, I don't know what happen here, but I sure that it maybe good experience for future when facing similar one.

That luckily day!!!

Sunday, April 12, 2009

FCKeditor JSP

JSP FCKeditor
String utf8 = new String(content.getBytes("8859_1"), "utf-8");

Friday, April 3, 2009


Wednesday, April 1, 2009

Disable directory listing on Glassfish!

access domain folder, point to config/default-web.xml