Tuesday, September 11, 2012

Accessing Portlets from WAS

Now here is a new thing I came to know,IBM has put in a portlet container into WAS 7 and maybe 6.1 as well. So I tried to run a portlet into WAS 7 and was successful. So without wasting time here are the steps to do it .

Note : - Portlets cannot run on WAS supplied with portal or on the WAS on which Portal server is running,so we need to deploy and run the portlets on server1 instance i.e separate standalone WAS.

If you try to run the portlet on the WAS on which portal server is running you might get an error such as "Direct portlet access prevented by WebSphere Portal ".

To access server1 admin console I used following url (https://localhost:9043/ibm/console/login.do?action=secure)

Step1 : Take a war containing portlets.

Setp 2 : Install the war in into the WAS

Step 3 : Provide the context root (eg /test)

Step 4 : Select server as server1

Step 5 : With all default settings complete the setup

Step 6 : Make sure war file is started

Now hit the following url in the browser to see the portlet

http://localhost:9080/mohit/SamplePortlet

format (http://localhost:9080/contextroot/portlet name as per portlet.xml)

By hitting the above url one should be able to see the portlet from WAS though basic features of portal will be missing from portlets as its running from WAS.

No comments:

Post a Comment