Friday, 1 March 2013

How to setup a WebDAV based document repository on GlassFish?

WebDAV has several advantages over others, and here are some of them:

  • It is HTTP extension, so it should be firewall friendly, and it can make use HTTPS
  • It is supported by main stream OS, and application servers such as GlassFish
  • It supports check-in/check-out of a document (locking)

To setup a WebDAV based document repository on GlassFish, follow steps below:

  1. create a web app project in NetBeans;
  2. add web.xml and glassfish-web.xml files to the project;
  3. configure the WebdavServlet follow the GF manual;
  4. add File Realm users via GF admin console if necessary;
  5. deploy the project onto GF;

To edit a file in the repository, you need a client. Windows' 'Web Folder' has problem in performance, and difficulty on Windows 7 (unless you install a patch originally for XP). I choose BitKinex, and here is how to:

  1. download and install BitKinex on your PC;
  2. create a new WebDAV connection;
  3. set your server address and port;
  4. set security to SSL;
  5. put your credential in places;
  6. in Site Map, set path to /<webapp>/webdav/
Once you have connected, you will see your whole webapp mounted under webdav node, which is editable.

Thursday, 28 February 2013

automatically or manually?

do things automatically if you know what will happen under the hood and you are willing to depend on the tool, otherwise you may encounter some surprises or feel completely powerless if you lose the tool.

Monday, 5 November 2012

How to use VBoxManage ?

Here is some examples (assuming the GuestAdditions has already been installed):
---------------------------------------
VBoxManage import Win7Ent32.ova
VBoxManage list vms
VBoxManage showvminfo "Win7Ent32"
VBoxManage startvm "Win7Ent32" --type headless
VBoxManage controlvm "Win7Ent32" poweroff

VBoxManage modifyvm Win7Ent32 --vrde on
VBoxManage modifyvm Win7Ent32 --vrdeport 3389

VBoxManage sharedfolder add "Win7Ent32" --name vboxshared --hostpath /tmp --transient
VBoxManage sharedfolder remove "Win7Ent32" --name vboxshared --transient
VBoxManage export "Win7Ent32" -o Win7Ent32.ova
VBoxManage unregistervm "Win7Ent32" --delete


How to use screen command?


screen is a useful command that allows a process keeping running after you exit/detach from ssh prompt, e.g.
-------------------------
create/enter a new screen: screen
start a process in the screen: lftp -u 'username,password' -e 'set ftp:ssl-force true;set ftp:ssl-protect-data true;get filename;bye' server_ip
detach from the screen: Ctrl-A, d
list current screens: screen -ls
attach to screen 8584.pts-2.dmzsrv: screen -r 8584.pts-2.dmzsrv

Wednesday, 3 October 2012

Thursday, 3 May 2012

How to change keyboard layout for login windows?

on Windows
-------------------------
set HKEY_USERS\.DEFAULT\Keyboard Layout\Preload to
409: US
809: UK

on RHEL
-------------------------
run setup to make the change
then reboot the machine

Wednesday, 11 April 2012

How to install OWB on Win7 (64bit)?

<1> download OWB2.0 from http://www.itdesign.de/en/support-downloads/downloads.html

<2> install JRE1.6 (32bit)

<3> install OWB2.0 using above JRE (Note: it doesn't work with 64bit JRE.)