When to use Servlet or @Controller

后端 未结 3 556
没有蜡笔的小新
没有蜡笔的小新 2020-12-23 03:50

I need to get a few things cleared up. I have been looking for an answer for this one, but I can\'t seem to find a good answer to my specific questions (eg. this questio

3条回答
  •  春和景丽
    2020-12-23 04:26

    JSF and JSP aswell as Spring MVC builts upon Servlets. The problem this that servlets are not very "nice" to work with because you have to write direct html.

    If you are able to use mordern web technologies I would just use servlets in positions that need direct http output like writing an image from a database to http.

    Using SpringMVC or JSF which work with a Dipatcherservlet or FacesServlet is just faster and more fun. They parse your files and send it through a servlet.

提交回复
热议问题