Solved

Problem with form processing

Posted on 2002-07-29
12
218 Views
Last Modified: 2012-08-13
Hola ,

I seek for months of research alone and only found partially solution of the problem below
...anyone faced this problem before ,please don't feel shy to reply....

I am start looking for solution since i have read this article -- http://www.itworld.com/nl/java_tut/03202002/

The first paragraph should tell you what i am looking for,
Please copy and paste all the document below to notepad or wordpad for better view ... :>






Senario -
1)A form registration of pc information (username ,serial number ,location ,processor type ) ,information
will input into database (microsoft access) .A auto generated database id for each time user submit the form to keep track the record.
2)View/Modift/Delete form of information entered above for maintenance purpose .For Example ,view form will
show all value entered from senario above.

total of forms.
1)User input
============
1.1)User input form
1.2)Validate user input form
1.3)Database processing form with SQL insert statement of user input

2.User view/modify
================
2.1)Query from database by selecting a database id(auto-generated and unique).
2.2)Display all information on selected database id (username ,serial number..etc)
2.3)Validate user input form
2.4)Database processing form with SQL update statement of user input

3.User Delete
===========
3.1)Query from database by selecting a database id(auto-generated and unique).
3.2)Database processing form with SQL delete statement on selected databse id.

problem.
=======

1.Database information not dynamic
================================
Database information like 'database name' ,'database driver' ,etc are hardcoded on 1.3
,2.1,2.2,2.3,2.4,3.1,3.2 form .So if the database name ,table name or driver change ...all forms contained the database name/table/driver name have
to change and test and re test.

2.Field name are static and hard coded
======================================

Field name like serial number ,location name ,etc ae hard coded to the form
1.1,1.2,1.3,2.2,2.3,2.4 .Example ,when 1.2 want to validate 1.1 form ,then have to ""re-declare""!!!
request.parameter to get the all the field name again and same to form 2.2 and 2.3.

Also insert SQL statement form 1.3 will be very messy if too much field need to insert to
database .I got 30-50 fields to add from the form.Worst case when need to change or add the field
name ,all form are effected and have to retest the whole stuff...too much of duplicate
declaration

3.User input form not dynamic
=============================
Input like location should remains default value to restrict user input .It should be a combo box
for user input to input. When too many combo box <option>blah</option> is very difficult to
maintain when need to add/delete combo box value .So i have used database to store the combo box
value and use custom tag to solve this.

4.Give flexibility to modify homepage
=====================================
Solution to the problem 1 and 2 should not give a limitataion on level of customization of the
presentation form especially the HTML file .

NOte: i have research some of the solution that i have found but only partially solve the issue above .
Solve validation issue - www.javaworld.com/javaworld/jw-10-2001/ jw-1005-forms.html
Solve dynamic form issue - www.javaworld.com/javaworld/jw-03-2000/ jw-0331-ssj-jspxml.html
Solve problem 1 - www.javaworld.com/javaworld/jw-02-2002/ jw-0201-xslt.html

I looking a solution to solve the problem 1 and 2 .I believe some one have definately faced this problem b4 and got some solutions ..pls point out...

Best regards ,

0
Comment
Question by:wikey
12 Comments
 
LVL 16

Expert Comment

by:heyhey_
ID: 7185749
> Database information like 'database name' ,'database driver' ,etc are hardcoded on 1.3 ,2.1,2.2,2.3,2.4,3.1,3.2 form

is this HTML form ? or ?
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 350 total points
ID: 7186009
I think a properties file or adding the DB name, etc to the web.xml file and making your retrieval of form parameters a method call should help out.

CJ
0
 

Author Comment

by:wikey
ID: 7186864
Hi all ,

>I think a properties file or adding the DB name, etc to >the web.xml file and making your retrieval of form >parameters a method call should help out.

Yes ,this is the partially solution i found from the net and i am looking for a complete frame work to solve at least 80 % issue above like some strut done by some briliant frame work....i don't want to do a duplicated job ...but when i refer to the strut on the net http://jakarta.apache.org/struts/userGuide/resources.html...i am lost ..the solution a bit here and their and partially solve my issue ..i am LOST!!!pls help.

> Database information like 'database name' ,'database >driver' ,etc are hardcoded on >1.3 ,2.1,2.2,2.3,2.4,3.1,3.2 form
>is this HTML form ? or ?

The system contains session tracking ,there are the JSP file
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 19

Expert Comment

by:cheekycj
ID: 7188093
Struts is a great framework (it just too long to develop for me so I had to create my own framework - not using taglibs- b/c struts was still in alpha release when I needed it)  But it maybe overkill for what you need.

Just use a properties file:
http://java.sun.com/docs/books/tutorial/essential/attributes/properties.html
or add the settings in the web.xml
http://www.webmasterbase.com/article/523/80

converting the retrieval of form paramaters should be a simple method:

public YourFormObject(HttpServletRequest req) {
YourFormObject formObj = new YourFormObject();
// paste your current form retrieval code here and add each value to formObj.
return formObj;
}

YourFormObject will be just a value bean that has a place holder for each form field.
Additionally it can have a validate method that you can call to validate the fields.

CJ
0
 

Author Comment

by:wikey
ID: 7189487
Hi ,

I have found this frame work which is solve my problem ,at least the most head ache one..which are validation field and database column maintenance.

http://jakarta.apache.org/turbine/tdk/

Any one have a experience one this.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7190771
Turbine seems to be a lot more than what you need.  What features about turbine were you looking at?

CJ
0
 

Author Comment

by:wikey
ID: 7192761
<Turbine seems to be a lot more than what you need.  What <features about turbine were you looking at?

as long can solve the issue above.

also ,how do i assign point separately for the answer provided ?
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7193525
>also ,how do i assign point separately for the answer provided ?

I am not sure I follow, you want to give points separately for what?

Actually after digging into Turbine and struts more, I have realized that Turbine may not be the solution you seek.  Turbine is not J2EE compliant here are some really good summaries of the differences btw them:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03206.html
http://www.mail-archive.com/general@jakarta.apache.org/msg00495.html

also if you note Turbine does not support JSP.

Your thoughts?

CJ
0
 

Author Comment

by:wikey
ID: 7204773
Hi CJ

<I am not sure I follow, you want to give points <separately for what?
Cause more than one people giving a good suggestion like u so i want to separate it.

<Actually after digging into Turbine and struts more, I <have realized that Turbine may not be the solution you <seek.  Turbine is not J2EE compliant here are some really <good summaries of the differences btw them:

I half way to test the Turbine ,but any how still not working yet .I have this error below ,if u know pls tell me.

init-tasks:

project-id-table-init-sql:
     [echo] +------------------------------------------+
     [echo] |                                          |
     [echo] | Generating PROJECT initialization SQL    |
     [echo] | for ID Broker system!                    |
     [echo] |                                          |
     [echo] +------------------------------------------+
[torque-sql] Generating to file C:\tdk\webapps\newapp\WEB-INF\src\sql\test-id-ta
ble-init.sql
[torque-sql] xmlFile:../conf/test-schema.xml

project-insert-sql:

insert-sql-file:

BUILD FAILED
file:C:/tdk/webapps/newapp/WEB-INF/build/build.xml:367: Source file does not exist!

Do you have an idea ?
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7236367
Hi,
  I was away on vacation, so sorry for the delayed response.  As far as splitting points, just post a 0 pt question in Community Support and they will take care of it.

  I can't help you with the turbine build issue, I am not familiar with it.  Any updates?

CJ
0
 
LVL 35

Expert Comment

by:girionis
ID: 8952385
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to cheekycj

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question