what is the difference between a portlet and a servlet?

前端 未结 5 1444
轮回少年
轮回少年 2020-12-22 16:57

I am asked to work on portlets and portals.

I want to know the difference between a portlet and a servlet?

How / where does a portlet differ (may be function

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-22 17:39

    Portlets are part of JSR-168 standard that regulates portal containers and components. This is different standard from standards for web containers (and servlets). Though there are definitely strong parallels between these two standards they differ in containers, APIs, life cycle, configuration, deployment, etc.

    The main difference between portlet vs. servlet could be that while servlet always responds to single type of action - request, portlet (due to nature of its life cycle and stronger container bindings) has to respond to two types of actions: render and request. There are of course more to it but I found this as the core difference between the two when I studied portal development.

提交回复
热议问题