Web User Interface for a Java application

后端 未结 7 1509
后悔当初
后悔当初 2020-12-14 03:22

I\'m trying to create a web user interface for a Java application. The user interface is going to be very simple, consisting of a single page with a form for users to pose t

7条回答
  •  醉话见心
    2020-12-14 03:53

    The technology you need to learn is the Sun Java Servlet specification since that is what ALL non-trivial java webservers implement. This enables you to write servlets which can do all the things you need server side. You can then develop against any container working well with your iDe, and deploy on any other container working well in production.

    You also need to learn basic HTML as you otherwise would need to learn JavaServer Faces or similar which is a rather big mouthfull to create the submit button you need with the other entries in a HTML form.

    For your Engine to work you can create a servlet with a singleton in web.xml, which you can then call. Be absolutely certain it is thread safe otherwise you will have a lot of pain. For starters you can declare your invoking servlet synchronized to ensure that at most one call of run() is active at any time.

提交回复
热议问题