The code for the server PepBCL which you can review in this repositories https://github.com/Ruheng-W/PepBCL
This server works on a JSP toolkit, you may need to learn how to use it and then apply this framework to your work.
Considering my technolgy is not so well to solve all the bug in the development, I ask some question to @skyyemperor and here thanks very much to him.