aspose file tools*
The moose likes Servlets and the fly likes Generating Servlets Using forms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Generating Servlets Using forms" Watch "Generating Servlets Using forms" New topic
Author

Generating Servlets Using forms

Amy Lee
Greenhorn

Joined: Nov 02, 2004
Posts: 25
Hi, I have to write a program for my database class that generates servlets using FORM files. We were not taught this process in class; rather we were expected to learn it on our own time. I've written servlets before directly, but I've never had to automate the process. I'm having a lot of trouble understanding where to start on this project. I'm not looking for someone to write the code for me; rather, I'd like someone to explain very clearly and unambiguously what steps I should take to accomplish this project. I've sought help from the professor with no luck.

Here are the directions he's given us; thanks for your help.

1. write a program that parses a FORM file, collecting its information into internal data structures. Question: I've written code to search a directory for .form files which then stores them into a list:



I don't understand where to go from here. How do I process these forms? Do I parse each form and store it in a list or an array? If so, what does this accomplish?

2. write another program that uses these data structures to create (via JDBC) a relational table in Oracle to contain tuples that will be submitted via this form. Question: I'm assuming this program is used to actually execute the form's actions?

3. write a third program that generates a Java file containing the genform, procform, and aggform methods, as prescribed in the Survey Specification Files]Survey Specification Files (http://www.cs.utexas.edu/users/dsb/CS347/Projects/SurveyFiles.html). Question: I am completely lost as to how I'm supposed to write these methods. Is there even any documentation of these methods in Java? Or are these methods user-defined?

4. automate the creation of Project 1's gateway web site. Question: This step could be cleared up if I understood steps 1-3.

5. automate the creation of a web site given the following FORM specifications. An example set of forms is here (http://www.cs.utexas.edu/~hamid/cs347/form-examples.html). Question: Same as above.
[ April 25, 2006: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generating Servlets Using forms