JavaServer Pages for Technical Writers: Making Your Documentation Do MoreJavaServer Pages (JSP) might be the answer to the age-old question, How can I create documentation that is easy to maintain, that lets my users make changes that wont be overwritten, that is customized for each individual user, that doesnt require that I create more than one version of the document, and that doesnt require plug-ins? DAVID CASTRO |
|
What is JSP? |
JavaServer Pages (JSP) is a relatively new technology introduced by Sun Microsystems, Inc. Similar to Microsoft Active Server Pages from Microsoft, you can use JSP to create dynamic HTML pages. This type of dynamic HTML is not the same thing as Dynamic HTML (DHTML). For JSP, it refers to the ability to customize individual pages by incorporating information from other sources, such as the following:
|
Who Can Use JSP? |
JSP is most effective when you host a copy of your HTML- or XML-based documentation on your Web site. This gives you the greatest flexibility to interact with databases, e-mail servers, external applications, and so on. If you create HTML- or XML-based documentation using an HTML editor (that is, you dont use a program to generate HTML from another source), but cannot host your documentation on a Web server, you can still use some of JSPs capabilities. See Using JSP Without Hosting on a Web Server to learn more on this subject. |
Do You Have to Know Java? |
The answers to this question are no, yes, a little, and yes, a lot. If you have no experience with Java, it is possible for you to use JSP to enhance your documentation: you can use JSP tag libraries. JSP tag libraries are discussed in Using Tag Libraries. If you know a little bit of Java, you can add scriptlets to your HTML topics. You can use scriptlets to embed Java functionality into your Web pages to enable them to do the following:
For additional information about scriptlets, see Using Scriptlets. If you know enough to create Java programs, you can create your own JSP tag libraries. Other members of your documentation department can use the tag libraries to enhance documentation. They do not need to know Java to use JSP tag libraries; you only need to know Java to write them. Some ideas for JSP tag libraries are discussed in More Ideas for JSP Tag Libraries |
Using Tag Libraries |
If you do not know any Java, you can still add JSP functionality to your HTML- or XML-based documentation. Example: Customizing online help for end-user needsLet's consider a software application that interacts with three types of databases: Oracle, SQL Server, and MySQL. You want to customize the help topic depending on which database(s) the end-user is using.
To see an example of conditionalization tag libraries in action, click here. |
Using Scriptlets |
If you know a little bit of Java, you can add scriptlets to your HTML or XML documents. Scriptlets embed Java functionality into your page. Example: Repeating text a set number of timesLet's consider an end-user input form. You want your users to select a value between 0 and 52. In a form, you create a select box with these values: <select name="select"> You have two options: you can hand-code the values 0 through 52, or, using JSP scriptlets, you could code your page to generate the same thing: <select name="select"> When the page is loaded, the end result is the same: the JSP scriptlet
generates the same standard HTML that you would have hand-coded. Click
here to open another browser window and see the output that the above
code creates. When the page displays, choose the option on your Web browser
that shows you the source code (View > Source,
in Internet Explorer). |
More Ideas for JSP Tag Libraries |
If you know a lot of Java, you can use JSP to do just about anything you can do with Java. The following are just a few ideas for tag libraries:
|
Using JSP Without Hosting on a Web Server |
While you cannot take advantage of all that JSP has to offer when you create static HTML- or XML-based documentation that is delivered with your product (instead of loaded onto a Web server), you still can take advantage of some of its features. The following are the steps that you would perform to take advantage of JSPs conditionalization capabilities. To create customized HTML- or XML-based documentation:
|
What Do I Need to Buy? |
Developing JSP does not require that you purchase any software. All of the software you need to create JSP pages is free to download:
There are also many tag libraries that you can download for free, or that you can purchase. Some sources for these include the following:
|
Resources |
I have searched for other Web sites that discuss using JavaServer Pages technology to enhance online documentation, but havent found any to date. The most helpful Web site that I can point you to is my own, jsp.davidcastro.com. If you need any help understanding or implementing anything from the site, please feel free to e-mail me at email@davidcastro.com. Many books have been released in the past 6 months on the topics of JavaServer Pages. The only one that I can recommend from having read it myself (all the way through, even!) is Web Development with JavaServer Pages, ISBN: 1884777996. This book has just released a second edition, which you can download for only $17.00 at www.manning.com/fields2/ebook.html. I haven't read all of the second edition, yet. Others books that have been highly recommended on Amazon.com include Advanced JavaServer Pages, ISBN: 0130307041 and JSP Tag Libraries, ISBN: 193011009X. You can create a small (5 MB or less) JSP-enabled Web site for free at www.mycgiserver.com. If you are looking for a hosting provider that will enable you to use a database and e-mail server, I highly recommend the provider that I use, www.mmaweb.net. They have a starter account for $25/month. The free application WebCopier is available for download at download.cnet.com.
WebWhacker 2000 ($50) has a free demo available for download at bluesquirrel.com.
I have not yet used either of these applications, and I know that there
are many more out there that can also perform the task of downloading
an entire Web site to your hard drive. Try applications until you find
one that works the best for your needs. If you feel like it, e-mail
me and let me know which application you prefer. |
| David
Castro works from his home outside of Charleston, South Carolina. When
he is not working as a Senior Information Developer for his telecommuting
job at CrossAccess Corporation, based in Santa Clara, California, he is
pretending to be a programmer by developing JSP tag libraries. He is married
and has a |
|
|
Practical Magic Reluctant Trainer Web Review Book Review Resources & References Home Fall 2001 (Volume 4, #4) Copyright © 1998, 2002 Society for Technical Communication |
|