Solved

Problem with form processing

Posted on 2002-07-29
12
204 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_
Comment Utility
> 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
Comment Utility
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
Comment Utility
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
 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 19

Expert Comment

by:cheekycj
Comment Utility
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
Comment Utility
<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
Comment Utility
>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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
allStar challenge 1 40
countAbc challenge 9 48
json format text only 4 64
mapBully challenge 6 86
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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now