This are the codes that wroted after learning from Java EE official document. I created them in my own opinion, they are simple but complete.