Populating an HTML-Form
Hello, at a jsp-Page I want to populate the a form, the required data are in a bean. How do I populate it? I´m new at the struts framework and I didn´t find documentation for this. The Struts-Example-Webapplication is nonapparent for me. For Detail: The user has see a list as an dynamic html-Table with userdata, every row has a link to edit this userdata. When he clicks on it a new form has to appear with the userdata, now he can edit it and make an database-update. My Problem ist to fill the form with the data, I would be glad if you can help me with the necessary Struts-tags, Regards Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales & eBusiness, R&D/VN Erich-Herion Str. 13 70736 Fellbach (Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de
Re: Problems with Database because of Datasource-Config of Struts!
thanks, but it´s indifferent if Autocommit is "false" or "true" it does not work with both options! Database is IBM DB2 7, but the reason for my problem ist the connection-object from the datasource-config. regards, Maik - Original Message - From: Meeraj Kunnumpurath To: '[EMAIL PROTECTED]' Sent: Thursday, July 12, 2001 3:14 PM Subject: RE: Problems with Database because of Datasource-Config of Struts! Check your autocommit mode Regards -----Original Message-From: Maik Mrazovic [mailto:[EMAIL PROTECTED]]Sent: Thursday, July 12, 2001 1:30 PMTo: [EMAIL PROTECTED]Subject: Problems with Database because of Datasource-Config of Struts! Hello, all parameters for a database of a webapplication are configured well in struts-config.xml. There are no problems when I make a SELECT, but INSERT, DELETE or UPDATE don´t work, I don´t know why exactly. The problem is the Connection-Object! If you use Struts-config.xml you get the Connection Object with java.sql.Connection myConnection = null; try { javax.sql.DataSource dataSource = this.getServlet().findDataSource(null); if (dataSource != null) { myConnection = dataSource.getConnection(); ... and so on. When I aks the Object of Classname (myConnection.getClassName()) the name is apache.struts.util.GenericConnection. With this Connectionobject are INSERT etc impossible, but why?! If my connection-Object is developed like this: try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c = DriverManager.getConnection("jdbc:ODBC:V68CIMPA", "j68cimpa", "cimpa"); INSERTS etc works fine!!! But that´s stupid, because I must have in every classes the database-parameter, with struts-config.xml not, it comes from .findDataSource(), in other words its better to configure the webapplication! I hope you can help me, best regards, Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales & eBusiness, R&D/VN Erich-Herion Str. 13 70736 Fellbach (Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de
Problems with Database because of Datasource-Config of Struts!
Hello, all parameters for a database of a webapplication are configured well in struts-config.xml. There are no problems when I make a SELECT, but INSERT, DELETE or UPDATE don´t work, I don´t know why exactly. The problem is the Connection-Object! If you use Struts-config.xml you get the Connection Object with java.sql.Connection myConnection = null; try { javax.sql.DataSource dataSource = this.getServlet().findDataSource(null); if (dataSource != null) { myConnection = dataSource.getConnection(); ... and so on. When I aks the Object of Classname (myConnection.getClassName()) the name is apache.struts.util.GenericConnection. With this Connectionobject are INSERT etc impossible, but why?! If my connection-Object is developed like this: try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection c = DriverManager.getConnection("jdbc:ODBC:V68CIMPA", "j68cimpa", "cimpa"); INSERTS etc works fine!!! But that´s stupid, because I must have in every classes the database-parameter, with struts-config.xml not, it comes from .findDataSource(), in other words its better to configure the webapplication! I hope you can help me, best regards, Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales & eBusiness, R&D/VN Erich-Herion Str. 13 70736 Fellbach (Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de
Re: Access a relational database, problem
Problem solved, it works now. I forgot a xml-end tag, that was all! But it´s strange, that Tomcat didn´t made an xml-input-error. Regards, Maik Mrazovic
Access a relational database, problem
I want to access relational database via Struts and JDBC. At Struts-User-Guide, 2.6, are instructions for creating the data-source - section at struts-config.xml and a example perform-Method for access. But it does not work, I can make a connect manual, but not with the struts data-source configuration: javax.sql.DataSource dataSource = servlet.findDataSource(null); dataSource is null after this row, so it didn´t find a datasource, although the data-source configuration is correct?! I would be glad if you can help me! Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales & eBusiness, R&D/VN Erich-Herion Str. 13 70736 Fellbach (Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de
Re: Servlet-Error, "Unable to open taglibrary /WEB-INF/struts-bean.tld ..."
Thanks, yes, it was already in web.xml, but the name of directory was "WEB-INF" (capital letters), the directory from Windows-NT was "web-inf", that was the reason! Does only Tomcat (I use 3.2.2) distinguish the letters, or is it at Websphere e.g. the same? Regards, Maik - Original Message - From: Jon.Ridgway To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 3:30 PM Subject: RE: Servlet-Error, "Unable to open taglibrary /WEB-INF/struts-bean.tld ..." Hi Maik, Have you entered the taglib tags into your web.xml? These should point to your tlds in your web-inf dir. Jon -Original Message-From: Maik Mrazovic [mailto:[EMAIL PROTECTED]] Sent: 28 June 2001 12:34To: [EMAIL PROTECTED]Subject: Servlet-Error, "Unable to open taglibrary /WEB-INF/struts-bean.tld ..." Hello, when I start "struts-example" or other struts-webapplications no error occurs, but if I start my application there comes always the error: "Unable to open taglibrary /WEB-INF/struts-bean.tld : Could not locate TLD /WEB-INF/struts-bean.tld" But I don´t know why, because the file is in web-inf-Directory of my application, why does this error happens?! Thanks so much, regards Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales & eBusiness, R&D/VN Erich-Herion Str. 13 70736 Fellbach (Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de
Servlet-Error, "Unable to open taglibrary /WEB-INF/struts-bean.tld ..."
Hello, when I start "struts-example" or other struts-webapplications no error occurs, but if I start my application there comes always the error: "Unable to open taglibrary /WEB-INF/struts-bean.tld : Could not locate TLD /WEB-INF/struts-bean.tld" But I don´t know why, because the file is in web-inf-Directory of my application, why does this error happens?! Thanks so much, regards Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales & eBusiness, R&D/VN Erich-Herion Str. 13 70736 Fellbach (Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de
Re: Servlet Error 500, Missing message for key index.title
Hi Klaus, thanks for your help, but as I already wrote it´s always the first key of the propertiesfile, in my case the "index.title" - key. I assume Struts don´t find any keys, and I dont know why. And in fact that I tried to start several war files, e.g. the struts-example (!) it has to work, but it does not! Perhaps a problem with Tomcat?! Regards, Maik Mrazovic - Original Message - From: "Klaus Thiele" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 26, 2001 11:46 AM Subject: Re: Servlet Error 500, Missing message for key index.title > Hi Maik, > > in your web.xml, add/change following parameter: > > [...] > >null >false > > > this does not solve your problem, but then you don't > get an exception/Error 500 but you will see in your page > _which_ key is missing. > > perhaps this helps. > klaus > > Am Dienstag, 26. Juni 2001 11:23 schrieben Sie: > > I´ve installed struts, under Tomcat 3.2. > > > > None Webapplication will run which uses > > ApplicationResources.properties, when I start an index.jsp there > > comes always the error > > > > javax.servlet.ServletException: Missing message for key index.title > > > > but i don´t know why?!!? The File is in correct folder, I´ve tried to > > start several webapplications which was deployed as war-Files, no one > > works, always this Error, that makes me crazy! > > > > I use Struts 1.0 b3, I hope somebody can help me! > > > > > > Maik Mrazovic > > > > T - S y s t e m s > > debis Systemhaus MEB GmbH > > Business Center Sales & eBusiness, R&D/VN > > > > Erich-Herion Str. 13 > > 70736 Fellbach > > > > (Phone) +49 711 17-40549 > > (Mobile) +49 170 832-5616 > > (email) [EMAIL PROTECTED] > > Internet: http://www.t-systems.de > > > Content-Type: text/html; charset="iso-8859-1"; name="Anhang: 1" > Content-Transfer-Encoding: quoted-printable > Content-Description: > > > -- > -- > Klaus Thiele - Personal & Informatik AG > mailto:[EMAIL PROTECTED] > > "Your mouse has moved. > Windows must be restarted for the change to take effect." >
Servlet Error 500, Missing message for key index.title
I´ve installed struts, under Tomcat 3.2. None Webapplication will run which uses ApplicationResources.properties, when I start an index.jsp there comes always the error javax.servlet.ServletException: Missing message for key index.title but i don´t know why?!!? The File is in correct folder, I´ve tried to start several webapplications which was deployed as war-Files, no one works, always this Error, that makes me crazy! I use Struts 1.0 b3, I hope somebody can help me! Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales & eBusiness, R&D/VN Erich-Herion Str. 13 70736 Fellbach (Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de