Welcome!

IBM Cloud Authors: Yeshim Deniz, Elizabeth White, Pat Romanski, Liz McMillan, Stefan Bernbo

Related Topics: IBM Cloud

IBM Cloud: Article

Developing Web Applications Using VisualAge for Java and WebSphere Studio Part 1

Developing Web Applications Using VisualAge for Java and WebSphere Studio Part 1

Your team has been assigned to build an end-to-end Web application. As a Java programmer, you need to focus on the code, to ensure that it can successfully call the required data. Your graphic and Web designers need to focus on the actual presentation to the user, to determine how best to display the information.

To ease the server-side programming process, it makes sense to build the application using a role-based approach:

  • Business logic: Determines the content generated
  • Presentation style and content: Determines how the information is presented
Whether you're a Java programmer who wants to work on the server side of a Web application or a graphic designer who may be more interested in working on the client view of the application, VisualAge for Java and WebSphere Studio provide the tools you need.

In creating a Web application, it's common to create Enterprise JavaBeans to access the back-end data (the business logic side of the application), servlets to control the flow through the application, and JavaServer Pages to display the information to the user (the presentation style and content of the application). In this scenario the Java programmer would concentrate on developing the EJB and the graphic designer would concentrate on the JSP design. Depending on skill or complexity, both could work on the servlets.

IBM provides VisualAge for Java for your server-side EJB development and WebSphere Studio for your client-side JSP/Servlet development. In Part 1 of this series we provide you with an overview of the tools available for Web application development and how they can be used to build and debug a complete end-to-end Web application. In Part 2 we'll build a complete Web site from the EJB created in the article "Building Enterprise Beans with VisualAge for Java" (JDJ, Vol. 5, issue 6).

Summary of Tools
WebSphere Studio

WebSphere Studio is a suite of tools that allows everyone on the Web development team to work together. It helps page designers, graphic artists, programmers and Web masters to work in such a way that each particular expert in the field can concentrate on doing his or her job well. The tools provided with WebSphere Studio help you to create, assemble, publish and maintain dynamic interactive Web applications powered by IBM's WebSphere Application Server. Use WebSphere Studio tools to create HTML, JSP and servlet files.

WebSphere Studio provides the following tools that will be useful for your client-side development.

  • JavaBean Wizard: Allows you to import a JavaBean and then generate from it an HTML input page, a servlet that uses the bean, a servlet configuration file and a JSP file to dynamically display the results to the user.
  • Page Designer: Advanced HTML editor that allows you to easily edit and create HTML and JSP files; provides support for servlets, JavaBeans and JavaScript so you can integrate these technologies with the generated client files. Also provides scripts for you to incorporate into your Web pages so you don't have to write the code yourself.
  • WebArt Designer and Animated GIF Designer: These tools enable you to create your own images.
VisualAge for Java
VisualAge for Java, an enterprise-level Java development environment, provides a complete team-programming environment with all the tools you need as a professional Java developer. It's used to create JavaBeans, complex servlets and EJB, as well as to run, test and debug your Web application.

VisualAge for Java provides the following tools for Web-based development.

  • WebSphere Test Environment: One of the biggest reasons to use VisualAge for Java as a development environment. This feature is a fully functional version of WebSphere Application Server that can run entirely within the VisualAge for Java IDE. This means you can run your entire application within the development environment, making use of the integrated tools and debugging support.

    As you build the application, you can configure the WebSphere Test Environment to match your deployment platform, including the creation of multiple Web applications, virtual paths and aliases. This allows you to re-create your entire deployment environment for debugging and testing before you deploy the application.

  • EJB server: The EJB development and test environment was covered in the June article referenced earlier. It also allows you to run the WebSphere Advanced EJB server inside VisualAge for Java.

    Figure 1 shows the EJB Server Configuration dialog. In the left pane you can start the Persistent Name Server and any number of EJB servers. The right pane shows the EJB groups and EJBs within the selected server. You can use this dialog to configure deployment descriptors for your EJBs and to set up the properties of the various servers.

    To test your EJBs, you can run both the EJB server and any number of client applications, all within VisualAge for Java. If the client application isn't finished (or for rapid testing of EJBs), a test client can be generated automatically. This test client is a simple application that allows you to test access to both the home and remote interfaces of each EJB. When you want to access the EJBs from a client application, VisualAge for Java can generate access EJBs that allow a client application to connect to your EJBs without writing any EJB code.

  • Integrated Debugger: As with any program running inside VisualAge for Java, your Web applications can also make use of the VisualAge for Java integrated Debugger. This tool allows you to debug your servlets, EJBs and JavaBeans just as you would in any other application, including setting breakpoints and setting up watches on variables. Perhaps the biggest bonus comes with the incremental compiler built into the VisualAge for Java IDE. When you find a bug, you can fix it and have it compiled directly into the running code without stopping and restarting the Web or EJB servers! This feature alone can save plenty of time during development.

  • JSP Execution Monitor: Allows you to debug JSP pages within the IDE. Figure 2 shows the JSP Execution Monitor options, which allow you to turn JSP page debugging on or off and set which options to use. The highlighted option, "Retrieve syntax error information," allows you to debug Java syntax errors in the JSP page.

    Figure 3 shows the JSP Execution Monitor window during execution. In the top pane are the JSP pages that have been run inside the Jmonitor. When these pages are initially compiled, the two middle frames show, respectively, the original JSP page source and the servlet generated from that source. As you step through the page using the toolbar, the current source is highlighted in both panes, and the HTML output from this source is displayed in the bottom pane. With familiar debugging features like breakpoints and step-through, the JSP Execution Monitor allows you to rapidly diagnose and fix errors in your JSP pages, whether they're Java coding errors or incorrect output from JavaBeans used by the JSP page.

· · ·
Next month we'll provide a detailed tutorial that walks you through the steps involved in developing a Web application using VisualAge for Java and WebSphere Studio.

More Stories By Anita Huang

Anita Huang is currently working on IBM's WebSphere Developer Domain site, providing in-depth samples and tutorials that incorporate the WebSphere software platform for e-business. Previously, she worked on the VisualAge for Java Information Development team, focusing primarily on componentry to build enterprise applications.

More Stories By Tim deBoer

Tim deBoer currently develops tools to build applications that run on WebSphere Application Server. He previously worked with the VisualAge for Java Technical Support group, providing support to enterprise developers working with VisualAge for Java.

Comments (0)

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
The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
The explosion of new web/cloud/IoT-based applications and the data they generate are transforming our world right before our eyes. In this rush to adopt these new technologies, organizations are often ignoring fundamental questions concerning who owns the data and failing to ask for permission to conduct invasive surveillance of their customers. Organizations that are not transparent about how their systems gather data telemetry without offering shared data ownership risk product rejection, regu...
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...
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
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 ...
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 IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...