In my previous post - An Introduction to Portal and Portlets we had an overall idea about Portal and Portlets and got answer to many common questions like - What is Portal ? What is Portlet ? What is Portal Container ? What are the features provided by Portal applications ? etc.
In this post, I will try to explain What is Portlet Specification ? What is relationship between Portlet API and J2EE specification ? What is similarities and differences between Portlet API and Servlet Specification ?
Let's start with What is Portlet Specification?
Portlet Specification, or Java Portlet Specification is a specification provided by JCP (Java Community Process) which defines Portlet API and standardizes rules for various components of Portlet API (like portlet preferences, user data, portlet request and response, deployment, packaging, security etc) to achieve interoperability among various portlets and portals.
The first version of Portlet Specification (JSR-168) was released in October, 2003. In February 2006, the second enhanced version of Portlet Sepecification (JSR-286).
(To learn about differences between JSR-168 and JSR-286, keep following my future posts :-) )
Well, we all know that for Web Applications, a specification is already there named: J2EE (Java 2 Enterprise Edition) specification. Then why we need a separate specification for Portlets.
The answer lies in similarities and differences between Portal application (or Portlets) and Web Applications (or Servlets).
Just have a look at following pictorial comparison between a J2EE Web Application and a Portal Application.
Web Application vs Portal Application |
Don't both of them look and work in almost same manner? For example, a web application can contain multiple servlets and a portal application can contain multiple portlet applications. Servlets process incoming requets and generates output (HTML), same way, portlets also process incoming requests and generates markup fragments (a part of entire output).
Yet, there are some subtle differences. For example, incoming requests in case of portlets are further divided into two categories: ActionRequests and RenderRequests (Keep following my future posts for more details about Request Types in Portlets), portal does content aggregations from different portlets before sending output back to the client. Each portlet can have their own preferences (called portlet prefrences), portal provides personalization and other features which a general web application doesn't do.
From above, what we can say is that portal applications are sophisticated version of web applications with all the features a web application provides along with some specialized features like content aggregation, personalization, single sign-on etc. Similarly, portlets are also analogous to servlets in terms of functionality, concepts and behavior.
Due to all these reasons, Portlet Specificaiton (or Portlet API V1.0) is based on J2EE V1.3 specification. Portlets and Portlet Containers meet all the requreiments specified in J2EE specification. Poerlet API V1.0 derives many functional and behavioral specifications from Servlet Specificaton 2.3.
Similarly, Portlet API 2.0 is based on J2EE V1.4 and Servlet Specification 2.4.
Following table provides comparision between Portlet and Servlets from various angle:
Servlets
|
Portlets
|
Servlets are Java technology based web components which are
managed by Servlet Container or Servlet Engine
|
Servlets are Java technology based web components which are
managed by specialized containers called Portlet Container
|
Servlets generates dynamic content as output
|
Portlets also generates dynamic contents as output but the
output is only fragment of the markup which will be aggregated by portal into
final page
|
Servlets works via request/response mechanism
|
Portlets also work via request/response mechanism,
however, portlet request/response
mechanism is more refined (further categorized into action request and render
request)
|
Servlets are directly bound to URLs
|
Portlets are not directly bound to URLs
|
Servlets don’t have concept of modes and window states
|
Portlets have pre-defined modes (View,Edit,Help etc) and
window states (minimized,normal,maximized)
|
In servlet, there is no concept of multiple instances because
they do not directly have any visibility on client side.
|
Portlet can exists multiple times on a single page each
instance being independent of each other
|
Servlets don’t have any concept of preferences to store
any customization data like portlets
|
Portlets have concept of Portlet Preferences where you can
store and retrieve any customization and configuration data specific to that
particular instance of the portlet on the page
|
Servlets don’t have access to user profile information
(infact in web app, there is no direct concept of user profile)
|
Portlets have access to user profile information
|
Servlets do not have URL rewriting functions similar to
Portlets
|
Portlets have URL rewriting functions for creating hyperlinks
within their content, which allow portal server indenpendent creation of
links and actions in page fragments
|
Servlet session has only one common scope for store
session level data
|
Portlet session is further divided into two scopes: Application-Wide
scope and Portlet’s Private scope.
|
Servlets have access to client request URLs, can set
character encoding and HTTP headers on response.
|
Portlets don’t have access to client request URLs directly and
cannot set character encoding or HTTP headers on the response.
|
A portlet application can contain JSPs and Servelts bundled with Portets and shares classloader, application context and session.
Portlets can leverage servlets, JSPs and JSP tab libraries to generate output markup fragments. A portlet can call a JSP or Servlet using portlet request dispatcher just like a servlet can invoke another servlet or JSP.
When a portlet invokes a servlet or JSP,
- All the portlet request attributes gets transferred to servlet request.
- Attributes set in portlet session are accessible from servlet session and vice-versa.
- Both portlet and servlet shares same output stream.
A portlet container is nothing but extension of servlet container. It can be built on top of existing servlet container or a portlet container itself can implement all the features of a servlet container.
That's it on Portlet Specification and it's relationship with J2EE and Servlets.
Keep following my future posts on more details about Portlet API.
Please provide you valuable comments/suggestions.
The blog gave me idea about portlet The difference between portlets and servlets are explained in an understandable manner
ReplyDeleteJava Training in Chennai
hello we are TIB Academy. We really liked your blog. Please do let us know if u have any problem with any other problem we will for sure solve it thank you
ReplyDeletehttps://goo.gl/PPYJHC
You are doing a great job. You inspire me to write for other. Thank you very much. I would like to appreciate your work for good accuracy and got informative knowledge from here.Amazon Web Services Training in Chennai
ReplyDeleteAmazon Web Services Training Institute in Chennai
Thanks for sharing your knowledge with us .This will absolutely going to help me in my future .
ReplyDeleteJAVA Training in Chennai
JAVA Course
Best selenium online training institute
ReplyDeleteI really enjoyed your blog, great content...
ReplyDeleteSelenium Training in Chennai
Best Selenium Training Institute in Chennai
ios developer training in chennai
.Net coaching centre in chennai
French Classes in Chennai
Big Data Training in Chennai
Best JAVA Training in Chennai
Java training institutes in chennai
java certification course in chennai
java certification training in chennai
I want to thank for sharing this blog, really great and informative. Share more stuff like this.
ReplyDeleteAWS Training in Chennai
DevOps Training in Chennai
Data Science Course in Chennai
ccna course in Chennai
Python Training in Chennai
R Programming Training in Chennai
Angularjs Training in Chennai
RPA Training in Chennai
Blue Prism Training in Chennai
So informative blog I liked it
ReplyDeleteSanjary Kids is one of the best play school and preschool in Hyderabad,India. Give your child the best preschool experience by choosing the best playschool of Hyderabad in Abids. we provide programs like Play group,Nursery,Junior KG,Senior KG,and provides Teacher Training Program.
Preschool teacher training course in hyderabad
Good blog posting information
ReplyDeleteSanjary Academy is the best Piping Design institute in Hyderabad, Telangana. It is the best Piping design Course in India and we have offer professional Engineering Courses like Piping design Course, QA/QC Course, document controller course, Pressure Vessel Design Course, Welding Inspector Course, Quality Management Course and Safety Officer Course.
Piping Design Course
Piping Design Course in Hyderabad
Piping Design Course in India
Thanks for sharing such a wonderful Post with us. I learnt alot from your post. I am appreciating from you to you will share more
ReplyDeleteinformation about it. Please keep sharing. Thanks Alot
Lenovo Service Center in Kukatpally, Hyderabad.
Best Laptop Service Center in Kukatpally, Hyderabad.
Great blog informative
ReplyDeleteSanjary Academy provide pressure vessel design,quality management system course, piping design course, qa/qc course and document controller course.
Welding Inspector Course
Safety officer course
Quality Management Course
Quality Management Course in India
Thanks for sharing Information
ReplyDeleteYaaron Studios is one of the rapidly growing editing studios in Hyderabad. We are the best Video Editing services in Hyderabad. We provides best graphic works like logo reveals, corporate presentation Etc. And also we gives the best Outdoor/Indoor shoots and Ad Making services.
video editors studio in hyderabad
short film editors in hyderabad
corporate video editing studio in hyderabad
ad making company in hyderabad
I just stumbled over this page and have to say - wow. The site is really good and kept up to date. Continue like
ReplyDeleteDAVV BCOM TimeTable 2020
DU BCOM TimeTable 2020
MU BCOM TimeTable 2020
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHere is the site(bcomexamresult.in) where you get all Bcom Exam Results. This site helps to clear your all query.
ReplyDeleteDBRAU BCOM 3rd Year Result 2020
BA 3rd year Result 2019-20
Sdsuv University B.COM 3rd/HONOURS Sem Exam Result 2018-2021
very nice info
ReplyDeletebest football
Very Nice Info Thanks For This....
ReplyDeletetechame
best affiliate programs
best photo editing software
best seo tools
best video editing software
best webinar software
nice
ReplyDeletesudoku
how to play sudoku
improve your sudoku game
5 best tips for beginners
Python training in bangalore
ReplyDeleteMachine learning course in bangalore
Data Science Online Course in Bangalore
Learn Storage Automation (Using Python) in Bangalore BTM
Cloud Computing Training in Bangalore BTM
This comment has been removed by the author.
ReplyDeleteHave you heared about these topic:
ReplyDeletehdmoviesflix
MoviesFlix
Syco Fidget Store
Hdhub4u ltd
Wpc15
ReplyDeleteWe came up with a great learning experience of Big Data Hadoop training in Chennai, from Infycle Technologies, the finest software training Institute in Chennai. And we also come up with other technical courses like Cyber Security, Graphic Design and Animation, Block Security, Java, Cyber Security, Oracle, Python, Big data, Azure, Python, Manual and Automation Testing, DevOps, Medical Coding etc., with great learning experience with outstanding training with experienced trainers and friendly environment. And we also arrange 100+ Live Practical Sessions and Real-Time scenarios which helps you to easily get through the interviews in top MNC’s. for more queries approach us on 7504633633, 7502633633.
Very Interesting blog. Thank you for sharing with us.
ReplyDeleteThirukkural pdf download
Sai Satcharitra in malayalam pdf
Sai Satcharitra in marathi pdf
Sai Satcharitra in kannada pdf
Sai Satcharitra in bengali pdf
Sai Satcharitra in gujarati pdf
mmorpg oyunları
ReplyDeleteInstagram takipçi satin al
tiktok jeton hilesi
TİKTOK JETON HİLESİ
antalya saç ekimi
referans kimliği nedir
instagram takipçi satın al
metin2 pvp serverlar
instagram takipçi satın al
ataşehir mitsubishi klima servisi
ReplyDeletekadıköy samsung klima servisi
maltepe mitsubishi klima servisi
kartal bosch klima servisi
kartal arçelik klima servisi
ümraniye arçelik klima servisi
üsküdar mitsubishi klima servisi
pendik vestel klima servisi
pendik bosch klima servisi
Wow! Nice Article.. Great author.. Keep posting
ReplyDeleteDigital Marketing Company in Coimbatore | SEO Company in Coimbatore | Best Digital Marketing Company in Coimbatore
Useful post thanks for sharing
ReplyDeleteSai Satcharitra Pdf
maraş
ReplyDeletebursa
tokat
uşak
samsun
G7L0B
salt likit
ReplyDeletesalt likit
dr mood likit
big boss likit
dl likit
dark likit
R03İ
salt likit
ReplyDeletesalt likit
0LXH8
Useful post
ReplyDeletegold price in chennai
today gold rate namakkal
"Great insights on the integration of portlets with J2EE! It's fascinating how portlets enhance web applications by offering reusable components, which can significantly improve user experience and functionality. As businesses increasingly rely on dynamic web applications, understanding these technologies becomes crucial. Similarly, mastering digital marketing strategies is essential for promoting these innovations effectively. Our Digital Marketing Course In Noida By Digiperform delves into how technical insights like these can be leveraged for marketing success, providing practical skills for aspiring marketers. Thanks for shedding light on this topic!"
ReplyDeleteGreat post! It's fascinating to see how the Portlet Specification builds on the J2EE and Servlet Specification to provide additional features like content aggregation, personalization, and multiple instances on a single page. Your detailed comparison highlights the nuanced differences and similarities effectively. Looking forward to your future posts on Portlet API and request types. For those interested in advancing their skills, consider checking out a Advanced digital marketing course in delhi
ReplyDeleteTurn on screen reader support. Keep up the excellent work!
افضل شركة مكافحة حشرات DaHYXI68hA
ReplyDelete