Create a portal project in MyEclipse with WebSphere Portal Server (top)

Source: Internet
Author: User
Tags websphere application server

With MyEclipse for WebSphere support, you can develop a JSR portlets and deploy it to WebSphere Portal 6.1, 7.x, or 8.x. In this tutorial, you will use the New Portlet Wizard to develop a default portlet. Using WebSphere Portal server requires a myeclipse blue or bling subscription. In this tutorial, you will learn to:

    • Configure the connector for WebSphere Portal server
    • Accessing portal Server from within MyEclipse
    • Create a Portlet Project
    • Deploy and test the Portlet

No myeclipse? Download Now

1. Required WebSphere Portal Server installation Information

While this tutorial is primarily about developing a JSR portlets process, myeclipse for WebSphere supports the development of all types of JEE applications, including WEB,EJB and Web services that can be deployed to WebSphere Portal, This is because WebSphere Portal is running on the WebSphere application server.

This tutorial was created using WebSphere Portal 8.0来, and the installation of WebSphere Portal 8.0 server has a typical installation type, which means that not only do we have a WebSphere Portal Server installed, And we also installed a new copy of the WebSphere app server to run on the portal server.

In this tutorial, you need to configure the following WebSphere portal values in MyEclipse.

    • WebSphere App Server Installation location
    • Installation location for WebSphere profile for the portal Server
    • Installation location for WebSphere Portal server

The WebSphere Portal Installation summary contains the required values.

2. Configure the WebSphere Portal Connector

(1) On the Server View toolbar, click New_server_icon. or right-click the server view and select New>server.

Available Application servers

(2) Select Server Connector and version configuration.

Select WebSphere Portal Server connector

(3) Accept localhost as the hostname, or you can provide a DNS name or IP address that is fully compliant with the host.

(4) Accept the default server name or enter a new name. The server name identifies the server in the server view.

(5) Accept the default Create a new runtime environment option to set the connector for the first time, and then click Next.

WebSphere Portal Server Connector configuration page

(6) Enter information about the runtime environment, including the path to the server installation.

(7) Select your version of JRE for WebSphere Portal server.

(8) Click Next to continue to enter the configuration information. These values are automatically populated from the server configuration.

Additional configuration details

(9) Click Next to select the project configuration on the server.

Add Project to Server

(10) Click Done. The server is configured and displayed in the server view.

The new server in the server view

Note : You can edit the server configuration by opening the server configuration Editor at any time by double-clicking the server name in the server view.

3. Accessing the portal Server from MyEclipse

Now, WebSphere Portal Server is in the server view, and in myeclipse it acts as any other server. This section will show you how to launch and Access portal Server from an embedded MyEclipse browser.

(1) Start the server by selecting and tapping Runservericon on the Server View toolbar.

When the server is started, the console shows that the WebSphere Portal Server is started. This means that you have configured the connector correctly. If you do not see these messages, then there may be a misconfigured server connection.

Running WebSphere Portal 8.0 from within MyEclipse

(2) After the server is started, use http://localhost:/wps/myportal to access the portal home page in the MyEclipse Web browser to ensure that the portal application is available.

Log on by using the same user name and password that you provided when you configured the server.

Login page for WebSphere portal

(3) Access the WebSphere administration console by right-clicking the WebSphere Portal Server in the server view and selecting open the management console.

Open the Management Console WebSphere Application Server Management Console home page4. Create a portal project for WebSphere Portal

In order to develop a JSR portlet to deploy to WebSphere Portal7.0 or 8.0, you first need to create a Web project and then add a JSR 286 portlet facets to it, Then deploy it to the portal Server on the portlets you created.

Note : For WebSphere Portal6.1, select JSR 168 when adding facets.

(1) When you create a new or select an existing MyEclipse Web project, the version of WebSphere Portal server is used as the target runtime.

Note : For WebSphere Portal 7.0,web projects, you must use the Web 2.5 specification instead of Web 3.0. WebSphere Portal 8.0 supports Web 3.0.

(2) Right-click the item and select Myeclipse>project facets>install JSR Portlets Facet.

(3) Select the target runtime for the JSR 286 portlet specification and WebSphere Portal version.

Add Portlet Facets

(4) Click Finish to complete the wizard. The Portlet resource is added to the project, and the library is added as part of the WebSphere Portal run-time library.

Portal Project Structure

(5) Right-click the item and select New> Other. The Type portlet is in the wizard search field. Select the Portlet, and then click Next.

The New Portlet Wizard

The first page of the new Portlet Wizard looks much like a new Servlet wizard. However, there are some important areas to be aware of, especially the use of template fields, Doview (), and Doedit () check boxes.

Enter package and portlet names and select a template

(6) Click Next to specify several fields to add to portlet.xml , and select Modify the file name of the generated JSP file.

Configure portlet Properties

(7) Click Finish to add the entry to portlet.xml , create the portlet Java file, and create the JSP view file.

Portlet.xml file

Create a portal project in MyEclipse with WebSphere Portal Server (top)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.