RE: Newbie question on Database and struts

2005-01-04 Thread Phillip Qin
: tomcat-user@jakarta.apache.org Subject: Newbie question on Database and struts I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set and display it on JSP. I have created a

RE: Newbie question on Database and struts

2004-12-27 Thread Amit Gupta
I tried SQLMaps. It is wonderful but is there any easy manual (except PDF that come with ibatis) available on net? Amit Gupta -Original Message- From: Dustin [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 28, 2004 1:28 AM To: Tomcat Users List Subject: Re: Newbie question on

Re: Newbie question on Database and struts

2004-12-27 Thread Dustin
This isn't exactly answering your question but... Check out iBATIS SQL Maps: http://www.ibatis.com/common/sqlmaps.html I won't go into how to use it. They have an excellent manual and tutorial. It is ridiculously easy to learn and use. Especially with Struts. Basically, you set up a query in an

RE: Newbie question on Database and struts

2004-12-23 Thread Goel, Manish Kumar
CTED] Sent: Friday, December 24, 2004 9:40 AM To: Tomcat Users List Subject: RE: Newbie question on Database and struts what i mean to array of databeans means - I have created employee data bean and for each row of result set i am creating one object of bean. So in a way i will get array of databeans

Re: Newbie question on Database and struts

2004-12-23 Thread Sharad Ramadas
You dont need an array of data beans. Store your data bean in an ArrayList or in a Vector. e.g ArrayList empList = new ArrayList(); Employee emp = null; while(rst.next()) { emp = new Employee(); /* Fill the employee object with the records from the database. */ empList.add(e

RE: Newbie question on Database and struts

2004-12-23 Thread Manisha Sathe
25 PM To: tomcat-user@jakarta.apache.org Subject: Newbie question on Database and struts I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set and display it on JSP. I have created a databean

RE: Newbie question on Database and struts

2004-12-23 Thread Amit Gupta
=(Vector)request.getAttribute("rows"); int sz=rows.size(); for(int i=0;i< sz;i++) { Hashtable row=(Hashtable)rows.get(i); ... } With regards, Amit Gupta -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Fri

RE: Newbie question on Database and struts

2004-12-23 Thread Amit Gupta
catch(SQLException ex1) { request.setAttribute("msg","Sorry! regsitration failed "); return mapping.findForward("sqlexception");

RE: Newbie question on Database and struts

2004-12-23 Thread John Najarian
ROTECTED] Sent: Thursday, December 23, 2004 7:25 PM To: tomcat-user@jakarta.apache.org Subject: Newbie question on Database and struts I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set

Newbie question on Database and struts

2004-12-23 Thread Manisha Sathe
I am new to struts (even new to java also) I have one form developed in struts. What i want to do is depending on form values, run sql qry in Action form, get result set and display it on JSP. I have created a databean for the results. But with result set -> How to create array of databeans ?