To make your COBOL program directly accessible to Web browsers–whether on computers, personal digital assistants (PDAs), or mobile phones–you should develop a Web interface to replace your application's current graphical or character-based front end.
For HTTP browsers like Internet Explorer and Netscape, you typically develop an interface in hypertext markup language (HTML) or extensible markup language (XML). HTML is the most common language for Web pages viewed with HTTP browsers, although XML is rapidly gaining ground for display dynamic content on the Web.
For mobile device browsers based on Wireless Application Protocol (WAP), you typically develop an interface in Wireless Markup Language (WML), but you can also develop an XML interface if desired.
XML documents are typically transformed to the output format of their targeted environment through the use of style sheets and a style sheet transformation language (XSLT). For instance, if a Web browser client makes a request, XML documents are typically transformed to HTML or PDF format for output. If a WAP device issues the request, they are typically transformed to WML. It is a published form of the document that is returned to the client, not the XML document itself. XML Web publishing vendors can provide more information on this subject, as well as the tools to develop such a solution.
HTML, XML, and WML are all markup languages that tell devices how to present information. All three of these languages use headers and tags to pass structure, formatting, hyperlink, and form description information to the receiving device. If you choose to, you can use other languages like VB script or Java script to develop your user interface. The only restriction is that the targeted browser or WAP device must be able to support the version of the language that you use.
To develop a markup language interface to your COBOL program, you can use any of several authoring tools. Many are available over the Internet free of charge. For instance, Cocoon Project is an open-source XML Web publishing framework from Apache. A search on HTML authoring tools turns up literally thousands of suggestions.
Whichever language you choose, you typically create fill-out forms to collect information from the user and send it to your CGI program for processing. The form must include information about how and where to send the information so that it can be processed. In HTML, this is accomplished with the METHOD and ACTION attributes of the <FORM> tag.
The Creating HTML Forms topic describes how to construct a form in HTML. For information on constructing XML and WML forms, refer to XML and WML reference books.