US 6,983,284 B2 | ||
Method to reduce input parameter interface error and inconsistency for servlets | ||
Jin Li, Toronto (Canada) | ||
Assigned to International Business Machines Corporation, Armonk, N.Y. (US) | ||
Filed on Mar. 22, 2002, as Appl. No. 10/104,527. | ||
Claims priority of application No. 2343491 (CA), filed on Apr. 03, 2001. | ||
Prior Publication US 2002/0178175 A1, Nov. 28, 2002 | ||
Int. Cl. G06F 17/30 (2006.01) |
U.S. Cl. 707—102 | 1 Claim |
1. A method of generating servlet program code, to reduce input parameter interface error, composing:
presenting to a user from a GUI utility tool a servlet program file specification page, wherein the GUI utility tool is run
on a development environment by the user;
presenting to the user by the GUI utility tool a servlet program file name, wherein the servlet program file may be an existing
file or a file that is to be generated by the GUI utility tool;
presenting to the user by the GUI utility tool an HTML file specification page;
presenting to the user by the GUI utility tool an HTML file name;
parsing an HTML file specified by the user to identify input parameters, wherein the parsing step further includes:
opening the HTML file specified by the user;
reading sequentially each tag in the HTML file;
determining for each read tag whether the tag identifies an input parameter;
in response to the determining step, if the tag identifies an input parameter, extracting a name of the input parameter;
if at least one of the tag is a last tag in the HTML file and the end of the HTML file is reached, determining whether any
input parameters have been extracted and, if so, using names of the input parameters to assign names for use in servlet program
code;
presenting the assigned names to the user; and
allowing the user to alter the assigned names;
generating, in response to a signal received from the user a servlet program file using the input parameters from the parsing
step; and
writing the generated servlet program file with a time stamp to a file corresponding to the servlet program file name, wherein
the GUI utility tool uses the time stamp to maintain synchronization between the servlet program file and the HTML file by
comparing the time stamp of the file corresponding to the servlet program file name with a time stamp of the HTML file and
generating an alarm if the time stamp of the HTML file is more recent than the time stamp of the file corresponding to the
servlet program file name.
|