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)

    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.


    IoT & Smart Cities Stories
    Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
    René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
    Whenever a new technology hits the high points of hype, everyone starts talking about it like it will solve all their business problems. Blockchain is one of those technologies. According to Gartner's latest report on the hype cycle of emerging technologies, blockchain has just passed the peak of their hype cycle curve. If you read the news articles about it, one would think it has taken over the technology world. No disruptive technology is without its challenges and potential impediments t...
    If a machine can invent, does this mean the end of the patent system as we know it? The patent system, both in the US and Europe, allows companies to protect their inventions and helps foster innovation. However, Artificial Intelligence (AI) could be set to disrupt the patent system as we know it. This talk will examine how AI may change the patent landscape in the years to come. Furthermore, ways in which companies can best protect their AI related inventions will be examined from both a US and...
    In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
    Bill Schmarzo, Tech Chair of "Big Data | Analytics" of upcoming CloudEXPO | DXWorldEXPO New York (November 12-13, 2018, New York City) today announced the outline and schedule of the track. "The track has been designed in experience/degree order," said Schmarzo. "So, that folks who attend the entire track can leave the conference with some of the skills necessary to get their work done when they get back to their offices. It actually ties back to some work that I'm doing at the University of San...
    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...
    Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
    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...