Tip

10 tips for building Java servlet applications with IBM tools

Many dynamic web applications, especially those that access databases based on user input, need to be on the server. Typically, these have been implemented using a Common Gateway Interface (CGI) application. Using, for example, Sun's JavaServer, such programs can instead be implemented with the

    Requires Free Membership to View

Java programming language.

The advantage of a Java servlet on servers with lots of traffic is that they can execute more quickly than CGI applications. Rather than causing a separate program process to be created, each user request is invoked as a thread in a single daemon process, meaning that the amount of system overhead for each request is slight.

The following tips are a quick guide for developers starting out building servlet applications. They are based on the use of the popular IBM VisualAge tool.

1. Pick the latest version of VisualAge for Java possible when developing servlets, and always apply the latest fix packs.

2. Use the Enterprise version of VisualAge for Java if you are planning on delivering Java applications for you company. The Professional edition is a good choice if you are just beginning to learn Java.

3. Export your servlet application packages to an external directory for testing.

4. Remember to specify URLs correctly qualifying packages names in web apps. Use a period, not a forward slash.

5. Use the best web server engine test environment possible. The latest version of IBM WebSphere matches the support in VisualAge for Java and your other development tools.

6. Build your application as Java beans. A "beans" approach brings several advantages to your applications: separation of the business logic from the interfaces, easy access for reuse to all your business logic and the thousands of classes in Java and the ability to build "smart" components that reduce development by an order of magnitude.

7. Build the interface to your applications using servlets. Servlets provide a simple "message based, client-server" common interface to your applications.

8. Leverage the power of DB2. It has very robust support for integrating applications and transactions using stored procedures, reliable application messaging, distributed data access and object store.

9. Build the web interface to your servlets using Java Server Pages. JSP is a scripting language for incorporating Java beans into web pages.

10. Expect more from your tools and yourself. With Java, there are many facets of development that are under your control.

About the Author

From "Servlets Part 2: Understanding Java servlets and putting them to work" by Jim Mason, AS/400 Experts Journal, Vol. 3, No. 2, March/April 2000. Provided courtesy of The 400 Group.

For More Information


This was first published in November 2000

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.