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

    @ThingsExpo Stories
    Recently, WebRTC has a lot of eyes from market. The use cases of WebRTC are expanding - video chat, online education, online health care etc. Not only for human-to-human communication, but also IoT use cases such as machine to human use cases can be seen recently. One of the typical use-case is remote camera monitoring. With WebRTC, people can have interoperability and flexibility for deploying monitoring service. However, the benefit of WebRTC for IoT is not only its convenience and interopera...
    When shopping for a new data processing platform for IoT solutions, many development teams want to be able to test-drive options before making a choice. Yet when evaluating an IoT solution, it’s simply not feasible to do so at scale with physical devices. Building a sensor simulator is the next best choice; however, generating a realistic simulation at very high TPS with ease of configurability is a formidable challenge. When dealing with multiple application or transport protocols, you would be...
    SYS-CON Events announced today that App2Cloud will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct. 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. App2Cloud is an online Platform, specializing in migrating legacy applications to any Cloud Providers (AWS, Azure, Google Cloud).
    IoT is at the core or many Digital Transformation initiatives with the goal of re-inventing a company's business model. We all agree that collecting relevant IoT data will result in massive amounts of data needing to be stored. However, with the rapid development of IoT devices and ongoing business model transformation, we are not able to predict the volume and growth of IoT data. And with the lack of IoT history, traditional methods of IT and infrastructure planning based on the past do not app...
    To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. Jack Norris reviews best practices to show how companies develop, deploy, and dynamically update these applications and how this data-first...
    Internet-of-Things discussions can end up either going down the consumer gadget rabbit hole or focused on the sort of data logging that industrial manufacturers have been doing forever. However, in fact, companies today are already using IoT data both to optimize their operational technology and to improve the experience of customer interactions in novel ways. In his session at @ThingsExpo, Gordon Haff, Red Hat Technology Evangelist, shared examples from a wide range of industries – including en...
    Intelligent Automation is now one of the key business imperatives for CIOs and CISOs impacting all areas of business today. In his session at 21st Cloud Expo, Brian Boeggeman, VP Alliances & Partnerships at Ayehu, will talk about how business value is created and delivered through intelligent automation to today’s enterprises. The open ecosystem platform approach toward Intelligent Automation that Ayehu delivers to the market is core to enabling the creation of the self-driving enterprise.
    "We're a cybersecurity firm that specializes in engineering security solutions both at the software and hardware level. Security cannot be an after-the-fact afterthought, which is what it's become," stated Richard Blech, Chief Executive Officer at Secure Channels, in this SYS-CON.tv interview at @ThingsExpo, held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
    Consumers increasingly expect their electronic "things" to be connected to smart phones, tablets and the Internet. When that thing happens to be a medical device, the risks and benefits of connectivity must be carefully weighed. Once the decision is made that connecting the device is beneficial, medical device manufacturers must design their products to maintain patient safety and prevent compromised personal health information in the face of cybersecurity threats. In his session at @ThingsExpo...
    SYS-CON Events announced today that Grape Up will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct. 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Grape Up is a software company specializing in cloud native application development and professional services related to Cloud Foundry PaaS. With five expert teams that operate in various sectors of the market across the U.S. and Europe, Grape Up works with a variety of customers from emergi...
    Detecting internal user threats in the Big Data eco-system is challenging and cumbersome. Many organizations monitor internal usage of the Big Data eco-system using a set of alerts. This is not a scalable process given the increase in the number of alerts with the accelerating growth in data volume and user base. Organizations are increasingly leveraging machine learning to monitor only those data elements that are sensitive and critical, autonomously establish monitoring policies, and to detect...
    SYS-CON Events announced today that Massive Networks will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Massive Networks mission is simple. To help your business operate seamlessly with fast, reliable, and secure internet and network solutions. Improve your customer's experience with outstanding connections to your cloud.
    Because IoT devices are deployed in mission-critical environments more than ever before, it’s increasingly imperative they be truly smart. IoT sensors simply stockpiling data isn’t useful. IoT must be artificially and naturally intelligent in order to provide more value In his session at @ThingsExpo, John Crupi, Vice President and Engineering System Architect at Greenwave Systems, will discuss how IoT artificial intelligence (AI) can be carried out via edge analytics and machine learning techn...
    Everything run by electricity will eventually be connected to the Internet. Get ahead of the Internet of Things revolution and join Akvelon expert and IoT industry leader, Sergey Grebnov, in his session at @ThingsExpo, for an educational dive into the world of managing your home, workplace and all the devices they contain with the power of machine-based AI and intelligent Bot services for a completely streamlined experience.
    With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, will examine the regulations and provide insight on how it affects technology, challenges the established rules and will usher in new levels of diligence a...
    In the enterprise today, connected IoT devices are everywhere – both inside and outside corporate environments. The need to identify, manage, control and secure a quickly growing web of connections and outside devices is making the already challenging task of security even more important, and onerous. In his session at @ThingsExpo, Rich Boyer, CISO and Chief Architect for Security at NTT i3, discussed new ways of thinking and the approaches needed to address the emerging challenges of security i...
    SYS-CON Events announced today that Datera, that offers a radically new data management architecture, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datera is transforming the traditional datacenter model through modern cloud simplicity. The technology industry is at another major inflection point. The rise of mobile, the Internet of Things, data storage and Big...
    An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics ...
    SYS-CON Events announced today that Datera will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Datera offers a radically new approach to data management, where innovative software makes data infrastructure invisible, elastic and able to perform at the highest level. It eliminates hardware lock-in and gives IT organizations the choice to source x86 server nodes, with business model option...
    With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, Cloud Expo and @ThingsExpo are two of the most important technology events of the year. Since its launch over eight years ago, Cloud Expo and @ThingsExpo have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, I provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading the...