Developing custom portlets using Eclipse --> Creating a dynamic web project in eclipse

Creating a dynamic web project in eclipse:

1). To create a Dynamic Web Project, go to File > New > Dynamic Web Project if you are in the Web 
     Perspective or File > New >Other > Web > Dynamic Web Project in any other Perspective.

2). Fill in the name of the project. Next, click on the New... button in the Target Runtime section to specify a 
     new Target Runtime. Click Jboss 4.2 Runtime and press Next.

3). On the next page we should give a name to the runtime. Example:JBoss Portal 2.7 Runtime,and then point
     it to the location of your JBoss AS + Portal installation

4). Click on Finish. It returns the New Dynamic Web Project wizard where it's also necessary to set the
     project Configuration.

5). The last wizard page is for configuring web modules. Here all values are set, so we can leave everything
     as it is.

6). Press Finish.


Adding a Java Portlet to the Project:
 
1). Call the New Java Portlet wizard by selecting New > Other > JBoss Tools Web > Portlet > JavaPortlet.


2). The wizard fills in The Web Project and Source Folder fields .Then we need to specify the Java package
     and the Class name and click Next .

3). On the other page we will be able to set the display name of the Portlet, a title, a description, the
     supported modes and init parameters.

4). On the next screen we can define which methods from GenericPortlet you want to override.


5). The last screen lets us build JBoss Portal specific descriptors to create an instance during the deployment
      and place it directly on the Portal.

Once Java Portlet is created, new resources have been added to the project structure.It adds a Java Portlet class, defaultobject. xml and portlet-instances.xml files and updates portlet.xml as well.


Thus the Project is ready to be built and deployed.

0 Response to "Developing custom portlets using Eclipse --> Creating a dynamic web project in eclipse"

Post a Comment

Powered by Blogger