Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 19117, OOP FormGenerator Version 3.2

by Jun Inamori Email: Anonymous


Input validation for JSP/Servlet by XML. You can convert HTML/XHTML/WML/HDML to the XML. Easy Localization (L10n) for Servlet.
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For JBuilder, Version 6.0  to 8.0 97 downloads
Copyright: Commercial use requires permission


Size: 391,761 bytes
Updated on Tue, 26 Nov 2002 21:54:37 GMT
Originally uploaded on Wed, 30 Oct 2002 15:47:27 GMT
SHA1 Hash: F97E7EC2EEA5F4EE6EF1869EA3B92D7DF73A54C4
MD5 Hash: C7DA9224AF866349B63E06A2821AF7DB

    Explore the files in this upload

Description
OOP FormGenerator is the Java API for JSP/Servlet programming. By this Java API, only a few method calls will be enough for the input validation from CGI FORM. It also makes Localization (L10n) very easier.
Assuming that the input to some text field on the CGI FORM must be restricted to the alphabetical characters (a-z or A-Z). But, the users may enter some digits (0-9). To be ready for the wrong input from the users, the destination JSP/Servlet should check the validity of the request parameters from the CGI FORM. In case of the wrong input, the JSP/Servlet should show the appropriate message to the users. Typically, the JSP/Servlet should show the same CGI FORM again, but with the previous inputs as the default values. In addition, the JSP/Servlet should indicate which field includes the wrong input. Then, the users can easily fix some of their previous inputs and send them again.
Who knows the acceptable data type for each input field in the CGI FORM? The answer is the CGI FORM itself. In other words, the HTML tag for the CGI FORM is the best place to write the acceptable data type for each field, if we could.
OOP FormGenerator makes it possible by XML. Please write a pair of HTML, one for the valid case and another for the invalid case. Both of them should include the HTML tag for the CGI FORM, but the latter should also include the messages (and the additional HTML tags) for the invalid inputs. Then, the conversion tool of FormGenerator will read a pair of these HTML and generates the single XML. While in the conversion, this tool will ask you to specify the acceptable data type for each input, and merge them into the resulting XML. Please copy this XML into WEB-INF/classes directory for your web application. That's all!
The FormGenerator object in the Servlet reads the XML and generates the CGI FORM. The user will type some texts in the CGI FORM and send the request to the Servlet. On the destination Servlet, the FormGenerator object uses the same XML for the input validation from the CGI FORM. If the invalid inputs are detected, the FormGenerator object will merge all the inputs into the CGI FORM (all the previous inputs will appear in the CGI FORM as the default values). This CGI FORM will also include the messages (and the additional HTML tags), which will point the invalid input. By this CGI FORM, the Servlet can ask the user to fix the invalid input.
The FormGenerator object is wise enough to select the XML for the Locale. This means your Servlet can show the appropriate message for the user's Locale, i.e. Japanese message for Japanese users and Chinese message for Chinese users. All you need are the pairs of the normal HTML, each of which includes the localized messages. On each pair, please run the conversion tool. Then, you ill get the XML for each Locale. Because you need not to prepare the resource files for the localized messages, Localization (L10n) is much easier than by JSP/JSTL.
Moreover, the source for the CGI FORM can be written in any mark-up language, such as XHTML, WML or HDML.

For details, please read the introduction at:
http://www.oop-reserch.com/formgenerator_1_1.html

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC04