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
    "MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
    "Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    "Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
    "IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
    Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
    "Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
    Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
    "There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    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...
    SYS-CON Events announced today that Telecom Reseller 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, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
    It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
    WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
    A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
    SYS-CON Events announced today that Evatronix 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. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
    Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
    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. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
    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 gr...