I've got some problems with my programm I have a HTML-page with some input-types which I want to save by a .jsp-page in a Bean. Another Bean takes the input and save it to a sql-database. Thats how it should work, but it doesn't...
statement.close(); connection.close(); } catch(java.lang.ClassNotFoundException e) { System.out.println ("JDBC-ODBC-Treiber nicht gefunden"); } catch(java.sql.SQLException e) { System.out.println ("Fehler beim Abfragen der Datenbank"); } } }
The Problem is, that when I type in data in the input type of the HTML-page the jdbcquery writes only "null" in the database. But when I put a <jsp:getProperty ... > in the HTML-page, he shows me the correct word which I have entered before. When I set the "lastName" variable in the MainContactAddressBean to a value like "test" and change the connect() Method of the jdbcquery to a main-method and start the jdbcquery, it writes "test" to the database... Unfortunately that is not the correct way I want this application to run... :) Have somebody an idea? Thanks