old java codes for ecommerce