Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Workshop and Portal

Basic functionality opens a new world

BEA WebLogic Workshop is the single point of entry for developers to develop J2EE applications on the BEA platform. The WebLogic Workshop Platform Edition includes support for portal development on top of the standard WebLogic Workshop Application Developer Edition.

This article introduces you to the various aspects of portal development that are enabled through the WebLogic Workshop tool. I'll go over the basics to get you started with developing your portal application in BEA WebLogic Workshop 8.1.

Setting Up Your Environment
The first step is to create a platform domain using the Domain Configuration wizard. You can use all the default settings for now. Once you have a domain, you need to start WebLogic Workshop to create a Portal Application and a Portal Project. These are pretty straightforward steps and I will not cover them in detail in this article. You can always use the WebLogic Workshop help to guide you through this process.

Create a Portal Within the Portal Project
Right-click on the Portal project that you just created in the Application Window. Choose New->Portal. The Portal designer appears with a default header, body, and footer for a Portal Desktop. The body contains a page (see Figure 1).

 

You are now ready to start developing portal applications and deploying them to the Portal Server.

Customizing a Portal in Workshop
There are various steps to customizing your Portal in the Workshop environment. I'll cover a few of these in this section.

Add Books and Pages to Your Portal
A book forms the basic placeholder for different pages within a portal. In the RealPortal example, we could have a Realtor book, with the different pages that a realtor would be interested in. Portlets are added to individual books and pages. Administrators can let users create their own Portal Desktops with these resources.

By default, when you create a new portal a book and a page are created for you. You can create additional books and pages by dragging and dropping the appropriate controls from the palette on the left side onto the Portal Designer. Select a Book or a Page from the Portal Designer window. In the Document Structure window, you can set different properties on the book or page you selected. You can do things like change the layouts, presentation styles, titles, skins, look-and-feel, and various other properties. We won't discuss these in detail here, but it is worth your time to explore these for yourself.

Set Up Navigation for the Portal Desktop
Once you've created the appropriate books and pages for your portal, the next step is to set up the appropriate navigation. You also need to set the default page that will appear when the users access the portal. Right-click on a book and select Navigation. There are three levels of navigation that you can set using WebLogic Workshop.

  • Multi-Level Menu: Multiple levels of nested tabs for navigating among books and pages.
  • Single-Level Menu: A single row of tabs for navigating among books and pages.
  • No Navigation: Text navigation for books and pages
Once you have a basic portal configured, it is now time to create your portlets and surface them in the portal that you just created.

Portlets in Workshop
You can have three basic types of portlets in WebLogic Portal.

  • JSP: A JSP file surfaced as a portlet within the portal; a JSP portlet is used for simple programmatic functionality.
  • Java Page Flow A portlet based on a Java Page Flow that allows you to leverage the features of the Java Page Flows to create a Web application that can be surfaced using a portlet. Java Page Flow portlets are used complex interactivity or multi-page portlets.
  • Java Web service: This portlet calls out to a Web service.
Creating a JSP/HTML Portlet
Start by going to the File Menu and choosing new File Type. Create a new portlet and select the type of portlet you want to create. Select JSP/HTML Portlet (see Figure 2).

 

Now you can specify various properties for your portlet. Fill in the entries as you want, and click Finish.

Along with the ability to create JSP/HTML Portlets, the BEA Portal Server also contains several tag libraries that help you add personalization, content, and other portal functionality to your JSPs. The WebLogic Workshop Portal extensions provide the following JSP tags. These tag libraries are:

  • User/group management
  • Personalization and tracking
  • Content management
  • Property sets
  • Internationalization and localization
  • Entitlements
  • Portal interface rendering
  • Utilities
Web Service Portlets
Portlets can call Web services in several ways.
  • Form: A portlet takes some input from users through an HTML form and calls the designated Web service.
  • Call generation: A stubbed-out portlet that calls into the designated Web service. You need to edit the generated JSP to add your functionality.
  • Interface creation: An annotated portlet that includes directions on how to use the interface you will use to call multiple Web services.
  • Asynchronous interaction: Portlets can participate in asynchronous communication with Web services such as conversations.
Java Page Flow Portlets
If you have created a Java Page Flow, you can easily surface the page flow as a portlet using the Portlet wizard. Click on File -> New -> Portlet. Select a Java Page Flow Portlet from the Portlet wizard and complete the wizard.

We now know how to create portlets through the BEA WebLogic Workshop tool. Let's look at the controls provided in WebLogic Workshop that help with portal development.

Portal Controls in Workshop
In order to use controls in portlets, you must use the Java Page Flow portlets. The Java controls included with WebLogic Portal Extensions allow you to insert complex tracking and personalization functionality into Java Page Flow portlets. Let's look at these controls.

  • Create user: Create new users using the UserManager EJB.
  • Generic event: Generic events are those not used for behavior tracking, and therefore generally not persisted. You can set its attributes and set up a listener for this event.
  • Generic tracking: Exposes the ability to configure, generate, and dispatch a tracking event (events that are generally persisted), to the event service.
  • User login: Enables authentication and allows a visitor to log in to a portal; indicates success and surfaces profile information.
  • User profile: Provides the business logic to retrieve and update user profile information.
  • User information: A utility control; returns the list of roles for a particular user as well as the list of groups of which that user is a member.
Portal Designers in Workshop
BEA WebLogic Workshop comes with several visual designers to develop various portal components. The following designers can be invoked from the Portal Designer:
  • JSP: Designs the JSP and HTML portlets
  • Property Set: Provides the tools to create different types of property sets
  • Session Request: Allows you to create properties that you can set and get from an HTTP Session or Request
  • User Segment: Allows you to create User Segments that are used to perform dynamic personalization based on predefined rules
  • Portal Placeholder: Creates placeholders, which are used to target the results of a content search
  • Event: Lets you register a custom event you have developed
  • Campaign: Allows you to creates campaigns for Portal
  • Content Selector: Creates or edit Content Selectors, which are used to define rules for retrieving content
  • Catalog Structure: Creates fields for labeling the items in your catalog
Deploying Portal Applications
As you develop your portal application, you'll want to deploy it for testing and debugging. Once that is done, you'll want to deploy your portal into production. The deployment concepts for portals are generally similar to those for any J2EE application.

The first step is to deploy the portal application that you create. You can deploy a portal application and its Web applications and Enterprise JavaBeans (EJBs) before you add portals or any other functionality to the application. Then, as you add portals and other functionality, they appear automatically in the deployed application. You can deploy a portal EAR file that you can build through WebLogic Workshop (better for QA or production deployment), or the exploded directory structure (better for development).

The basic steps to deploying your portal application are:

  1. Start the WebLogic Server Console in a browser at http://localhost:7001/console.
  2. In the WebLogic Server Console, choose Deployments > Applications in the left pane. Right-click Applications and choose Deploy a New Application.
  3. In the Deploy an Application window, click the directory containing the portal application you want to deploy.
  4. Select the option button next to your application and click Continue.
  5. In the next window, review your choices and click Deploy.
Summary
In this article I have explored the basic functionality that BEA WebLogic Workshop Platform Edition provides to help developers develop portal applications for the BEA platform. WebLogic Workshop forms the single entry point for all portal development, replacing older portal IDEs such as the E-business Control Center .

References

  • Workshop Help: http://edocs.bea.com/workshop/docs81/doc/en/core
  • More Stories By Kunal Mittal

    Kunal Mittal is a consultant for implementation and strategy for Web services and services-oriented architectures. He has co-authored and contributed to several books on Java, WebLogic and Web services.

    Comments (1) View Comments

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    Most Recent Comments
    Kunal Mittal 01/12/04 04:14:43 PM EST

    This article was written with WebLogic 8.1 SP1. With SP2, there is a new type of portlet called Struts Portlet which is JSR 168 complaint.

    Thanks
    Kunal Mittal

    IoT & Smart Cities Stories
    All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by ...
    Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to ...
    DXWorldEXPO LLC announced today that Big Data Federation to Exhibit at the 22nd International CloudEXPO, colocated with DevOpsSUMMIT and DXWorldEXPO, November 12-13, 2018 in New York City. Big Data Federation, Inc. develops and applies artificial intelligence to predict financial and economic events that matter. The company uncovers patterns and precise drivers of performance and outcomes with the aid of machine-learning algorithms, big data, and fundamental analysis. Their products are deployed...
    Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
    The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
    CloudEXPO | DevOpsSUMMIT | DXWorldEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
    Cell networks have the advantage of long-range communications, reaching an estimated 90% of the world. But cell networks such as 2G, 3G and LTE consume lots of power and were designed for connecting people. They are not optimized for low- or battery-powered devices or for IoT applications with infrequently transmitted data. Cell IoT modules that support narrow-band IoT and 4G cell networks will enable cell connectivity, device management, and app enablement for low-power wide-area network IoT. B...
    The hierarchical architecture that distributes "compute" within the network specially at the edge can enable new services by harnessing emerging technologies. But Edge-Compute comes at increased cost that needs to be managed and potentially augmented by creative architecture solutions as there will always a catching-up with the capacity demands. Processing power in smartphones has enhanced YoY and there is increasingly spare compute capacity that can be potentially pooled. Uber has successfully ...
    SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
    When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...