Welcome Guest!
Create Account | Login

Locator+ Code:

Search: All
VSM/VBPJ Java Pro WSSM XML

FTPOnline

Channels

Conferences

Resources

Hot
Topics

Partner Sites

Magazines

About
FTP

Free Subscription to Java Pro

Resources

•

Get
the code for this article

•

Get
the code for this issue

Let Me Paint You a Picture
Use applets and servlets to create Web-based,
interactive graphics that can make many tasks a whole lot
easier
by Steve Lloyd

Today's businesses are under
increasing scrutiny by many different agencies. These agencies
watch everything from sales and expenses to where you dig in
the ground. Sometimes they require periodic reports that get
filed and reviewed only when there's a problem. Other times
you have to request permits that must be approved and posted
before work can begin. You can avoid many fines and stop-work
notices if you get all of the regulatory requirements right
the first time.

Web-based, interactive graphics help make permit requests
more meaningful. A picture really is worth a thousand or more
words. The picture's value gets higher when it can be saved as
part of the request. It becomes even more valuable when you
can draw on the picture and save the drawing as part of the
request.

ADVERTISEMENT

I've been working on a project to add interactive drawing
capabilities to an existing permit request system. An applet
allows the user to obtain a map from a map server and draw
figures and text on top of it. The applet is embedded in a
permit request Web page, and it saves the drawing in a
database associated with the permit request. The existing
permit system was written some time ago using Active Server
Pages (ASP) to generate text-based forms a user could complete
in a browser. It was designed to provide access from any
flavor of browser. The upgrade was required to meet the same
general goals as the original system.

This n-tier application has three significant
pieces of Java software: a drawing editor applet, a map
servlet, and a drawing servlet. The map servlet provides map
images similar to those obtained from sites like MapQuest. The
principal difference is that it uses electronic drawings that
are maintained locally. The editor applet obtains
user-requested maps from the servlet and allows the user to
draw figures and text on top of the map images. The editor
provides capabilities similar to those found in a vector-based
drawing package. The drawing servlet saves and retrieves
drawings created by the editor from the permit database. Let's
focus on capabilities provided by the drawing servlet.

The process for using interactive graphics for any permit
has four steps. First, a map has to be obtained and displayed
by the browser. Next, if a drawing exists, it must be obtained
and displayed on top of the map. Then, an editor must be used
to create a new drawing or modify an existing one to visually
describe the permit application. Finally, the drawing must be
saved in a database along with other data obtained from the
Web-based application form.

Back
to top

Printer-Friendly
Version

Free Subscription to Java Pro

<SCRIPT language="JavaScript1.1" SRC="http://ad.doubleclick.net/adj/xmlmagazine.dart/Pop-Up2;abr=!ie;sz=1x1;tile=1;ord=20051028102624872?">
</SCRIPT>
<NOSCRIPT>
<A HREF="http://ad.doubleclick.net/jump/xmlmagazine.dart/Pop-Up2;abr=!ie;sz=1x1;tile=1;ord=20051028102624872?"><IMG SRC="http://ad.doubleclick.net/ad/xmlmagazine.dart/Pop-Up2;abr=!ie;sz=1x1;tile=1;ord=20051028102624872?" border=0 height="1" width="1"></A>
</NOSCRIPT>

Java
Pro | Visual Studio Magazine | Windows Server System
Magazine
.NET Magazine | Enterprise Architect | XML & Web Services
Magazine
VSLive! | Thunder Lizard
Events | Discussions | Newsletters | FTP Home

© Copyright 2001-2005 Fawcette Technical Publications | Privacy Policy | Contact Us