• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

portlet

 
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
whats the difference between and servlet and portlet ?
Does portlet work on any diffrent principles or mechanism than servlet ?

thanks
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Portlets Vs Servlets
================

Some of the basic similarities are:

Both are Java technology based web
components
1 Life-cycle is managed by a specialized
container
– Servlet by servlet container
– Portlet by portlet container
2 Both generate dynamic content
3 Both interact with web client via a
request/response paradigm

Differences:
===========

Portlets only generate markup fragments, not
complete documents
? Portlets are not directly bound to a URL
? Web clients interact with portlets through a portal
system
? Portlets have a more refined request handling
– action requests and render requests
? Portlets have predefined states
– portlet modes and window states
? Portlets can exist many times in a portal page


Extra Features of Portlets
====================

? Portlets have means for accessing and storing
persistent configuration and customization data
? Portlets have access to user profile information
? Portlets have URL rewriting functions for creating
hyperlinks within their content
– allow portal server agnostic creation of links and
actions in page fragments
? Portlets can store transient data in the portlet
session in two different scopes
– application-wide scope
– the portlet private scope


Servlet Features Forbidden to Portlets
=========================

? Setting the character set encoding of the
response
? Setting HTTP headers on the response
? The URL of the client request to the portal


Servlet Features that areleveraged by Portlets
=================================

? Portlets can leverage servlets, JSPs and JSP
tag-libraries for generating content
– Content should be markup fragment
? A portlet can call servlets and JSPs using a
request dispatcher


Integration between the two
===================

? Attributes set in the portlet request are
available in the included servlet request
? Attributes set in the portlet session are
accessible from the servlet session and vice
versa
? Portlet and the included servlet or JSP
share the same output stream


Hope the above helps
-Sethu Rengarajan

 
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic