You are on page 1of 8

What is a portal ?

A portal can be best described as a web site that acts as a "point of entry" or a gate to a larger system. While it seems pretty difficult to define a portal in the strictest sense, these are some of the common features of portals: y Content aggregation: Portals tend to aggregate content from multiple, disparate sources and provide one unified view of the same. Personalization: This refers to the ability of the portal to tailor the content/services that it offers according to the user of the portal. Search: Most if not all portals, offer some form of searching of it's content and sometimes even content from external sources. Single Sign On: Allows users to authenticate once to the portal and thereby allows access to many other systems without the need for re authentication.

What is a JSR 168 Portlet ?


Prior to JSR 168, almost all portal platforms offered their own proprietary approach to create pluggable portal components. For example, IBM had IBM portlets, Sun(iPlanet) had Providers, SAP had iViews and Plumtree had Gadgets. JSR 168 aims to standardize these pluggable portal components so that they are independent of the actual portal server that they are written to. What this means is that one can migrate portlets seamlessly from one portal server to another without any code change.

What are the types of request in JSR 168 portlets?


There are two types of request :1)RenderRequest 2) ActionRequest

What are the differences between portlets and servlets?


Essentially, Servlets provide content that normally takes up the whole page in a browser (unless you're using frames), and portlets provide content that is wrapped by a window. With portlets, you can have multiple portlets side by side with one another and each one can provide content and functionality that is different from the other. A portlet can provide the complete interaction for one type of application, while another portlet can provide content for another type of application. The portal can provide some house

keeping functionality and secured single point of entry to all of the portlets on a page. As for the particulars (similarities/differences) between them, please continue reading. Here are some similarities: y y y y y y y y y Servlets and portlets are web based components that utilize Java for their implementation Portlets are managed by a portlet container similar to a servlet container Both of these components generate content, which can be static or dynamic Both portlets and servlets have a lifecycle that is controlled by the container The client/server model is used for both servlets and portlets The packaging and deployment are essentially the same The manner in which the classes are loaded and the class loaders that perform the work are also the same Lifecycle management is similar The Request and Response semantics are also similar

Here are some differences: y y y y y y y y y Servlets can provide complete web pages, whereas portlets only provide fragments. These fragments are then aggregated to form a complete web page by the portal Portlets aren?t allowed to generated HTML code that contains tags such as base, body, frame, frameset, head, html, or title. The iframe tag can be used with caution. The user cannot access a portlet directly using a URL in the way that a servlet is accessed. Instead, the URL points to the page containing all of the portlets on one page Communication between the web client and the portlets is performed through the portal Portlets can be provided with buttons or controls to manipulate the portlets? window states or portlet modes Multiple instances of a single portlet can be placed onto the same page Portlets support persistent configuration and customization Portlets also support user profile information Portlets support two scopes within the session; application scope and portlet scope

There are several things that servlets are allowed to do, but portlets aren?t. These include the following: y y y Portlet aren?t allowed to set the character set encoding of the response Portlet also aren?t allowed to set the HTTP headers on the response Portlet cannot manipulate the URL of the client request to the portal

What is a portlet container ?


A portlet container runs portlets and provides them with the required runtime environment. A portlet container contains portlets and manages their lifecycle. It also provides persistent storage for portlet preferences. A portlet container receives requests from the portal to execute requests on the portlets

hosted by it. A portlet container is not responsible for aggregating the content produced by the portlets. It is the responsibility of the portal to handle the aggregation.

Can I get the HttpServletRequest from a Portlet?


The PortletRequest object is supposed to give you everything you need i.e. parameters, attributes, dispatching, etc. As per the spec, you should not need the HttpServletRequest. However, some portlet container implementations do provide some kind of hack to get hold of HttpServletRequest e.g. in Pluto you can cast theRenderRequest to HttpServletRequest. But, be aware that this behavior cannot be relied upon.

What's

between PortletContext.getInitParameter()?

difference

PortletConfig.getInitParameter()

and

Context-wide init-params share the same context space as Servlets and JSPs belonging to the same application and they are defined in the web.xml file. You can get them using PortletContext.getInitParameter() method. Portlet-wide initialization parameters on the other hand belong in the portlet.xml file and you can get them usingPortletConfig.getInitParameter() method.

What is a PortalSession Interface ?


User identification across many requests and transient information storage about the user is processed by PortletSession interace. One PortletSession is created per portlet application per client. The PortletSession interface provides a way to identify a user across more than one request and to store transient information about that user. The storing of information is defined in two scopes- APPLICATION_SCOPE and PORTLET_SCOPE. APPLICATION_SCOPE: All the objects in the session are available to all portlets,servlets, JSPs of the same portlet application, by using APPLICATION_SCOPE. PORTLET_SCOPE: All the objects in the session are available to the portlet during the requests for the same portlet window. The attributes persisted in the PORTLET_SCOPE are not protected from other web components.

What is a PortletContext Interface ?

The portlet view of the portlet container is defined by PortletContext. It allows the availability of resources to the portlet. Using this context, the portlet log can be accessed and URL references to resources can be obtained. There is always only one context per portlet application per JVM.

Is there any difference betweeb websphere and weblogic ?


Webpshere tends to focus more on integration, connectivity and web services. it has rich implementation of J2EE, better performance, more extensive integration and transaction management. In terms of trnsaction weblogic is having default transaction attribute as supports, but websphere does not have any default transaction attribute.

How to implement JDBC-ODBC bridge driver (Type 1 ) in Websphere?


If you use JDBC type (I) driver you dont need to add any driver in websphere. you simply created DSN and use it locally, same we use java class, if you use Type(2) and Type(4) so first go to admin console then go to connection, then add driver there fill other info like conn. size, uname pass, max conn. and connect it to you applications.

What is the difference between application server and web server?


ApplicationServer: takes care of Security, Transaction, Multithreading, Resource pooling, load balancing, clustering, performence, highly availability, scalability, etc. Exposes business logic to client applications through various protocols, possibly including HTTP. Supports deployment of .war and .ear filesApplication server = webserver + EJB container. Webserver: handles HTTP protocol. Receives HTTP request, it responds with an HTTP response.

Explain relationship betweeb the Servlet Container and Portlet Container?


The portlet container is an extension of the servlet container. As such, a portlet container can be built on top of an existing servlet container or it may implement all the functionality of a servlet container. Regardless of how a portlet container is implemented, its runtime environment is assumed to support Servlet Specification 2.3

Explain portlet lifecycle?


A portlet is managed through a well defined life cycle that defines how it is loaded, instantiated and initialized, how it handles requests from clients, and how it is taken out of service. This life cycle of a portlet is expressed through the init, processAction, render and destroy methods of the Portlet interface.

What is a Portlet? Explain its capabilities. Portlets are UI components that are pluggable and are managed, displayed in a web portal. Markup code fragments are produced by the portlets which are aggregated into a portal page. A portlet resembles an application that is web based and is hosted in a portal. Email, discussion forums, news, blogs, weather reports are some of the examples of portlets. Explain Portal architecture. The core implementation of the portal is UI, hosted by a Portal server. The HTTP requests, HTML responses, and returning appropriate portal pages are handled by the Portal UI. Enterprise Web application also can be handled by the Portal Server. The portal architecture has the following: Automaton Server: This server performs the management of job scheduling and implementation of a portal. It accesses all remote crawlers and profile services retrieved and stored from a remote database. Image Server: This server hosts images and other web page content used by web services and a portal. With this configuration, large static files are to be sent directly to the browser without portal server impacts. Search Server: This server indexes and searches all the information, applications, communities, documents, web sites through portal. Collaboration Server: Web content publication and management for portals and web applications are supported by this server. Its functionality can be accessed by a remote web services through Enterprise Web Development kit. Content Server: Publication and management of web content for portals and web applications along with form based publishing, branding, templates, content expiration is allowed by this server. Authentication Server: This server handles the portal authentication for users and remote services can be accessed through EDK. Remote Servers: Web services written using the EDK are hosted by remote servers. The servers can be in different countries, on different platforms and domains.

What is PortletSession interface? User identification across many requests and transient information storage about the user is processed by PortletSession interace. One PortletSession is created per portlet application per client. The PortletSession interface provides a way to identify a user across more than one request and to store transient information about that user. The storing of information is defined in two scopes- APPLICATION_SCOPE and PORTLET_SCOPE. APPLICATION_SCOPE: All the objects in the session are available to all portlets,servlets, JSPs of the same portlet application, by using APPLICATION_SCOPE. PORTLET_SCOPE: All the objects in the session are available to the portlet during the requests for the same portlet window. The attributes persisted in the PORTLET_SCOPE are not protected from other web components.

What is PortletContext interface? The portlet view of the portlet container is defined by PortletContext. It allows the availability of resources to the portlet. Using this context, the portlet log can be accessed and URL references to resources can be obtained. There is always only one context per portlet application per JVM. Why portals?

The following are the reasons to use portals: Unified way of presenting information from diverse sources. Services like email, news, infotainment, stock prices and other features are offered by portals. Provides consistent look and feel for enterprise. Eg. MSN, Google sites. Explain the types of portals, Function-based portals and User-based portals Function-based portals Horizontal Portals: These are the portals are of type general interest. Yahoo!,Lycos,AOL,Freeserve,Sympatico are examples of horizontal portals. Vertical Portals They provide a gateway to the information pertaining to a specific industry such as insurance, banking, finance, automobile, telecom etc. User-Based Portals B2B The enterprises extend to suppliers and partners by using B2B portals. B2C The enterprises extend to customers for ordering, billing, services by using B2C portals. Portals

Portals

B2E Portals The enterprise knowledge base integration and related applications into user customizable environment is done with B2E portals. This environment is like one stop shop.

JBoss portal server features

JBoss portal server features


y
Highly integrated web applications costs reduce by portals. JBoss enables the reusability of branding and deploying new applications of composite nature.

y y y

The users and the industry can be customized, personalized their experiences in a secure and well governed manner by using JBoss portal. JBoss incorporate components into a portal as reusable and standardized portlets, as Jboss is platform independent. Performance and scalability is ensured.

Explain the concepts and capabilities of Portal Structure Markup Language, PSML

PSML was created to allow abstraction and content structure within Jetspeed. It has two markups:

y y

Registry markup: Describes the availability of resources to the Jetspeed engine. It supports multiple portlet registries. Site markup: The availability of portlets are described by this markup, which is displayed for a given user.

What is JServer and what is it used for? JServer is a JVM. Oracle database servers address space is shared with JServer to run. Oracle provides an Accelerator for JServer to compile the java code natively. The overhead of Java interpreter is eliminated and speeds up the execution of Java code by utilizing JServer.

Rich user interfaces and AJAX Rich user interfaces can be achieved by using a combination of dynamic HTML elements such as HTML and JavaScript. However, the scope of such an interface is limited to client-side behavior and has minimal functional implications due to the lack of server-side interactions. AJAX in JBoss portal AJAX has gained tremendous popularity in the traditional web application development world due to the richness and agility that it brings to user interfaces. Portals, such as JBoss portal, can also gain signifi cantly from AJAX, in terms of implementation of both behavior and functionality. JSR-168 AJAX limitations Before we look at the features and options provided by the new specifi cation, let's look at how traditional JSR-168 portlets functioned. As shown in the following fi gure, the "Action" request invoked the processAction method on the server, which implemented controller logic to route it to the correct view. JSR-286 and AJAX Among the set of features that the new portlet specifi cation JSR-286 introduces to make things easier for AJAX implementations, are the options to directly communicate with the portlet through shared render parameters and resource serving. Developing an AJAX portlet Implement AJAX functionality in one of the portlets, using asynchronous server calls and dynamic HTML.

AJAX support for markup JBoss portal supports markup through tags on layouts and renderers of the pages. Special tags are added to layout JSPs that facilitate the placement of AJAX features on a page. Similarly, renderers are used to interpret the tags and to render AJAX-driven content. The obvious advantage is the in-built support for the auto-creation and control of AJAX components on portal pages. AJAX support for content Whereas the layout and renderer contribute to AJAX behavior at the markup level, JBoss portal's support for objectlevel confi guration can be leveraged to provide AJAX support at the page level. The object property inherits a confi gured behavior from its parent. Currently, two features are offered for AJAX-driven content Considerations for AJAX implementations Although AJAX is an exciting technology and provides signifi cant advantages in terms of performance, usability, and implementation, there are certain scenarios where using AJAX is not a good fi t. This is especially true when a lot of custom development is involved in using AJAX libraries.

Ipc JSR-286 introduces two methods of Inter Portlet Communication:

y y

Shared render parameters: allows portlets to set params that can be read by other portlets. This rather simple mechanism will probably be enough for all but the most complex communication needs. Events: needed for complex scenarios. The main advantage of this second method is that it allows a fully decoupled communication. A portlet issues an event and doesn't have to care if there is anyone listening for it.

In absence of any well defined sophisticated mechanism, JSR 168 developer had to rely upon either PortalContext or Application Scope of Session for sharing information between the protlets.

You might also like