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
    With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
    Amazon is pursuing new markets and disrupting industries at an incredible pace. Almost every industry seems to be in its crosshairs. Companies and industries that once thought they were safe are now worried about being “Amazoned.”. The new watch word should be “Be afraid. Be very afraid.” In his session 21st Cloud Expo, Chris Kocher, a co-founder of Grey Heron, will address questions such as: What new areas is Amazon disrupting? How are they doing this? Where are they likely to go? What are th...
    SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
    In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...
    Digital transformation is changing the face of business. The IDC predicts that enterprises will commit to a massive new scale of digital transformation, to stake out leadership positions in the "digital transformation economy." Accordingly, attendees at the upcoming Cloud Expo | @ThingsExpo at the Santa Clara Convention Center in Santa Clara, CA, Oct 31-Nov 2, will find fresh new content in a new track called Enterprise Cloud & Digital Transformation.
    Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, will discuss how given the magnitude of today's applicati...
    SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” 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. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
    Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
    As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.
    SYS-CON Events announced today that Avere Systems, a leading provider of enterprise storage for the hybrid cloud, 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. Avere delivers a more modern architectural approach to storage that doesn't require the overprovisioning of storage capacity to achieve performance, overspending on expensive storage media for inactive data or the overbui...
    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.
    SYS-CON Events announced today that Avere Systems, a leading provider of hybrid cloud enablement solutions, 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. Avere Systems was created by file systems experts determined to reinvent storage by changing the way enterprises thought about and bought storage resources. With decades of experience behind the company’s founders, Avere got its ...
    High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using...
    In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
    SYS-CON Events announced today that CAST Software 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. CAST was founded more than 25 years ago to make the invisible visible. Built around the idea that even the best analytics on the market still leave blind spots for technical teams looking to deliver better software and prevent outages, CAST provides the software intelligence that matter ...
    SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion 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. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
    As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
    SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion 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. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
    SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion 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. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...