Shortly speaking you can not. Desktop applications are too different from web-based ones. You need to study servlets, JSPs, tomcat and many other things.

Easiest way however is to use Vaadin...