What does a portlet bridge do?

2019-05-05 16:20发布

In an interview today I mentioned that I had done some jsf work in a portlet. The interviewer asked for specifics on what the portlet-bridge does. I never looked into it all that much, just used it because I was told it would make jsf work in the portlet. All I could really say was that it allowed the requests to come from the portal to jsf in a way jsf would understand, and made it play nice.

What exactly does the portlet-bridge do?

1条回答
手持菜刀,她持情操
2楼-- · 2019-05-05 16:21

From the spec linked by Jeremy Walton above.

2.1 What is a Portlet Bridge?

The Java™ Portlet Specification defines a set of APIs for directly implementing a portlet. A portlet bridge is a technology used by a portlet to bridge to an execution environment where differing abstractions are used for rendering markup or processing user interactions. Typically these are well-known, possibly standard web development environments. Examples include JavaServer™ Faces and Apache Struts.

The portlet bridge acts as the translation engine between the portlet environment and the targeted system. It expresses the portlet request context to the bridged environment, executes the request and transforms the response as appropriate for the portlet environment. It provides an abstraction of the portlet environment for the bridged environment, and for developers working within the bridged environment. These developers are freed to execute Faces views as portlets, without the need to understand the details of the portlet APIs and development model.

To put it simply, a portlet bridge is the technology that allows a Java web developer to execute views developed using other web programming abstractions as portlets without needing to know and or learn about portlet development, concepts, or APIs.

The Portlet Bridge for JavaServer™ Faces is the specific bridge technology needed to support this bridging behavior for JavaServer™ Faces.

查看更多
登录 后发表回答