Question

When I create a servlet application, I deploy the war file on the app server and hit the servlet url and provided there is a proper mapping, I will get to my page.

Now if it is a portlet application, just deploying the portlet on the portal server does not do the job. We also have to login to the portal, and basically 'add' the portlet by going to 'manage pages'. What exactly are we doing in this step? And why is this step necessary? We do not need to do this for a servlet application.

My other question is that in a portal server, there seems to be two kinds of admin consoles...one which resembles a standard WAS admin console. The other is where you Manage pages and do other kinds of stuff. Why do we have two kinds of consoles?

Is it just that the added functionality could not be designed into the standard WAS console because IBM wanted to reuse WAS console for Portal server?

Was it helpful?

Solution

The first thing you should probably understand is that portlets are not servlets. Even though, portlet containers may use servlets underneath portlets (which I'm not even explicitly sure about), the programming model is different and you will need to mindful of that when designing and implementing solutions with them.

Portlet applications can be directly referenced by the context root you defined when you installed it. However it's the portlet container that what will call your doView, processAction, etc methods and help maintain the state of the portlet and the navigation state of the user. Adding the portlet to a page let's Portal know where you want the portlet to be available in the page model.

You have two administration consoles because WebSphere Portal runs on top of WebSphere Application Server. That is the standard WAS admin console you're using there. You'll use it to administer your standard WAS stuff (servers, database connections, web services, etc). The Portal Admin console is there to administer portlet specific specific things, such as the page model, portlets, themes, etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top