Results 1 to 2 of 2
  1. #1
    skigodmg is offline Member
    Join Date
    Mar 2011
    Posts
    1
    Rep Power
    0

    Default Mysql data to build a HTML form

    I am new to java (not in a class).

    I was trying to use a mysql table to hold all the names of the input fields I want in my HTML form. I was then going to have the servlet create the HTML with a loop that would build the form and then the same thing to handle it the submitted data.

    I would like to be able to add fields quickly and have the application dynamically handle it (end user manage exact content). Is this the right approach? Are there any good examples of this? Are servlets the right choice for this?

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Not the right approach.
    Use a javabean driven framework for input properties that lets you bind values to Java objects rather than to strings. That way the parameters are automatically passed both ways from client to server side in a clean way and at the server side you'd have java objects that you can pass to a clean persistence solution. JSPs are better for presentation than servlets too.

Similar Threads

  1. JLabel, HTML Form: How to access the data?
    By q.kontinuum in forum AWT / Swing
    Replies: 0
    Last Post: 01-27-2010, 03:23 PM
  2. Replies: 10
    Last Post: 08-12-2009, 05:02 PM
  3. How to use one form to submit data to 2 tables on mysql
    By kwesiaryee in forum New To Java
    Replies: 2
    Last Post: 10-10-2008, 02:41 PM
  4. Replies: 0
    Last Post: 04-04-2008, 10:36 AM
  5. how to upload a file along with html form data
    By pranith in forum Java Servlet
    Replies: 3
    Last Post: 07-30-2007, 03:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •