save multiple records into database using jsp/servlet mvc

save multiple records into database using jsp/servlet mvc

hai,

this is my jsp where i have enter multiple username and password and save it to database in single hit

user.jsp

<form action="UserServlet" method="post" >
<table>
<tr>
  <td>Username</td>
  <td><input type="text" name="userName"/></td>
</tr>
<tr>
  <td>Password</td>
  <td><input type="password" name="passWord"/></td>
</tr>
<tr>
  <td>Username</td>
  <td><input type="text" name="userName"/></td>
</tr>
<tr>
  <td>Password</td>
  <td><input type="password" name="passWord"/></td>
</tr>
<tr>
  <td>Username</td>
  <td><input type="text" name="userName"/></td>
</tr>
<tr>
  <td>Password</td>
  <td><input type="password" name="passWord"/></td>
</tr>
<tr>
  <td><input type="submit" value="Add Users" name="submit"/></td>
  <td><input type="reset" value="cancle" /></td>
</tr>
</table>
</form>

after add user click pass values to servlet set to bean and pass bean to dao insert() and insert into database

thank u..

View Answers

February 11, 2013 at 3:07 PM

hi friend,

actually what you are asking is already available in framework like spring please go through the link this may be helpful for you

http://www.roseindia.net/tutorial/spring/spring3/web/spring-3-mvc-form-example.html


February 12, 2013 at 11:32 AM

hai friend,

thank u, using string[] i did tat its workg fine









Related Tutorials/Questions & Answers:
save multiple records into database using jsp/servlet mvc
save multiple records into database using jsp/servlet mvc  hai, this is my jsp where i have enter multiple username and password and save it to database in single hit user.jsp <form action="UserServlet" method="post
Upload Image and save in database using jsp-servlet mvc
Upload Image and save in database using jsp-servlet mvc  Here is my code.. In jsp ... <form name=frm method="post" action="Device">...;/tr> In servlet... try { String strpath
Advertisements
Upload Image and save in database using jsp-servlet mvc
Upload Image and save in database using jsp-servlet mvc  Here is my code.. In jsp ... <form name=frm method="post" action="Device">...; In servlet... try { String strpath=request.getParameter("Image
fetch and insert multiple rows into mysql database using jsp servlet
fetch and insert multiple rows into mysql database using jsp servlet  ... jsp form and want inserting it into my mysql database table. but i am having a problem to insert multiple rows into database using a single insert query
Jsp using mvc - JSP-Servlet
Jsp using mvc  hi I have written using mvc2 architecture, i have written logic in java ,i want to print a message on the form stating the the values... closely together. Read MVC 2 Pattern in Struts2 in details and visit
How to insert or delete records in MS access database using jsp - JSP-Servlet
How to insert or delete records in MS access database using jsp  Hi friends please provide me a solution that i insert or delete record from a database using java server pages. I used the microsoft access 2003 database. PlZ
edit database using jsp and servlet
edit database using jsp and servlet  I am creating a website using jsp and servlets that is used to view houses from a database. I want to be able... information from the database in the textboxes. Please help me to display
How to create file and save it into user defined path using jsp/servlet?
How to create file and save it into user defined path using jsp/servlet?  Hi.. Onclick event I have created one file.When file will create it should asked where to save file(like browse option
How to browse excel file and stored the contents into the database using jsp/servlet?
How to browse excel file and stored the contents into the database using jsp/servlet?  Hi.. I want to browse excel file and stored the file data into the My-sql database using jsp/servlet
fetch record from oracle database using jsp-servlet?
fetch record from oracle database using jsp-servlet?  how can i fetch data from oracle database by using jsp-servlet. i'm using eclipse, tomcat server and oracle database and creating jsp pages and also using servlet
How to retrieve image from database using jsp and servlet?
How to retrieve image from database using jsp and servlet?  Hi, I am trying to find code for displaying the image from database in a JSP page. How to retrieve image from database using jsp and servlet
Image upload in mysql database using jsp servlet
Image upload in mysql database using jsp servlet  Hello, I need code to insert image in mysql database, I have seen the code which is already in your portal but it is not inserting image into database it save in the folder
Populate dropdown menu from database using jsp and servlet
Populate dropdown menu from database using jsp and servlet  please i need code to populate dropdown menu from mysql database using jsp and servlet. thanks
Upadate Database using updatable fields - JSP-Servlet
Upadate Database using updatable fields  Hi, Thanks for previous answers.They were of Great Help !!! I want to create a jsp in which data is pulled from database and displayed in the updatable fields.Means after user
retrive the employee details with image from mysql database using jsp servlet
retrive the employee details with image from mysql database using jsp servlet  im doing the web project to retrive the employee profile which i stored in the database using jsp servlet then want to show the result in the next jsp
Facing Problem to insert Multiple Array values in database - JSP-Servlet
facing the problem while inserting the data in database. iam using the MsAccess Database My Database structure is Like iam using tow tabel ,CustomerDetails...Facing Problem to insert Multiple Array values in database  Hai
How to save run time created text-file on a disk using jsp/servlet?
How to save run time created text-file on a disk using jsp/servlet?  I have a JSP page with save button.In that I created the file(e.g a.txt) at run-time,when I click on the save button,it will ask where to save the file
connec to database - JSP-Servlet
connec to database  Need code to connect the application to database. I have developed the application JSP and Servlet
Multiple upload - JSP-Servlet
Multiple upload  Hello everyone and Deepak i am using jsp and mysql I am using the program published on roseindia.net of Multiple upload and i am facing an error as given below please help and reply soon this is my 8th
How to store values in a database using JSTL? - JSP-Servlet
How to store values in a database using JSTL?  I want to store values in a database... How can i store in database? Here is my code... This wil... in database using JSTL name number Position add
Upload Excel into Database Table Using SERVLET - JSP-Servlet
Upload Excel into Database Table Using SERVLET  Hi i hava sitution that upload .xls file into database table which has same coloumn names... in database table are NAME,ID,SAL. please help me to upload that excel using
Updating Ms Access Database using jsp - JSP-Servlet
Updating Ms Access Database using jsp  Hi I am new to jsp and I am trying to update a record in an access database. I only want to update part of the record because the other columns already have data. When I use Update
Acees data from database using combo box - JSP-Servlet
Acees data from database using combo box  please let me how i access the data from database when i select combo box combo2 having values Arts... value 11 or 12, otherwise combo box combo2 remain hide. Here is JSP's files
how can i prevent duplicate records using servlets and MVC model?
how can i prevent duplicate records using servlets and MVC model?  hai, I need a program to insert values into database at the same time it shows... want this program in MVC model.can anyone help me... Thanks&Regards P.Divya
Backup MySQL Database - JSP-Servlet
Backup MySQL Database  Database Sir I have been reading Rose's india tutorial "Using MySQL Database with JSP/Servlet". In the Tutorial you have shown an example of backing up the database. When I tried to backup database
How to save database data into excelsheet using hibernate
How to save database data into excelsheet using hibernate  How to save database data into excelsheet using hibernate
How to check no records - JSP-Servlet
How to check no records  Hi all, I am developing an onlineshopping project, in that how i have 2 check no records. I saw an answer, but is for finding not null only... ie, if(rs!=null) But i need the null checking
NEXT and PREVIOUS Records - JSP-Servlet
which technology u are using?? Thanks
database - JSP-Servlet
database  how to downloaad a file(doc) from database and store in any local system by using servlet
upload to database - JSP-Servlet
to upload a pdf file into database(sqlserver2000) using jsp. In roseindia some examples... into database whenever i want that uploaded pdf file i have to retrieve it from database please help me friends thanks in advance it is very urgent
connection with database - JSP-Servlet
and the connection with the database using jsp code, I get exceptions that I have... with java code. Is there any other way to establish a connection with database in jsp... with the database by writing the program in java. Following is the code: import
Multiple forms in JSP - JSP-Servlet
Multiple forms in JSP   Hi, I want to place multiple submit buttons in jsp pages ! and the multiple buttons will perform multiple actions...://www.javajazzup.com"; document.theForm.submit() } Multiple Buttons Example
how to save uploaded image in database using javascript
how to save uploaded image in database using javascript  Please can you tell me how to store uploaded image in database using java I'll use...; Now i want to store it on database...ADS_TO_REPLACE_1 Please help me Thanks
how to retrieve data from database using combobox value without using request.getParameter in jsp - JSP-Servlet
how to retrieve data from database using combobox value without using request.getParameter in jsp  Answer pl
Multiple file Uploading - JSP-Servlet
Multiple file Uploading   Hello everyone I am using jsp and my IDE is eclipse and back end is ms sql server i am trying to upload multiple...() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile
displaying both image and records problem in jsp and servlet - JSP-Servlet
displaying both image and records problem in jsp and servlet  hello... the application to display more than one employee records and their pictures. e.g. say i'm having records like: firstname, lastname, empid, department, salary, job_title
How to upload files to server using JSP/Servlet?
How to upload files to server using JSP/Servlet?  How to upload files to server using JSP/Servlet
Insert image from user using and save in database
Insert image from user using and save in database  when i am trying to upload a image from user and trying to save into oracle9i database... occurred processing JSP page /upload.jsp at line 27 24: String file
inserting multiple file formats into database using html
inserting multiple file formats into database using html   hi the code was working fine,i want to choose the file and then upload to database,by using html.whether it is possible to upload larger file size,please explain
displaying employee records and their images problem - JSP-Servlet
displaying employee records and their images problem  hi, Thanks for your reply to my question. The code you sent to me yesterday.... the structure of my database is: emp_id int; picture blob; first
Display Records in Tree Format - JSP-Servlet
Display Records in Tree Format   hi i want to displays data in the tree format with root nodes, child nodes and leaf nodes in a jsp file. The data is from database and once we select a perticular leaf node and click submit
displaying images and records problem - JSP-Servlet
displaying images and records problem  hi, Thanks for your reply... it, all what i want is to display staff records and their pictures on the web pages... database is: emp_id int; picture blob; first_name varchar(50); last_name
display records with images problem - JSP-Servlet
browser. i have written a servlet that retrieves the pictures from the database with a unique id. Also i wrote i jsp that link to servlet in order to display..., Display images from database to visit ... http://www.roseindia.net/jsp
linking jsp with database using classes and methods and then access them all in to my jsp page - JSP-Servlet
linking jsp with database using classes and methods and then access them all in to my jsp page  how to connect jsp page with mysql using classes... all with the help of java beans in u'r own jsp page
How retreive data from database without using post method in jsp - JSP-Servlet
How retreive data from database without using post method in jsp  Tell me how?  Hi Friend, If you don't want to use post method then use..., not on another page so use both the jsp pages. http://www.roseindia.net/jsp
online test software using jsp and servlet
online test software using jsp and servlet  online test software using jsp and servlet
Multiple files upload code using spring mvc 2.0 with xml configuration without using annotations
Multiple files upload code using spring mvc 2.0 with xml configuration without using annotations  how to write code to attach multiple files and upload using spring mvc 2.o with xml configuration with out annotations? please
how to use String tokenizer on table that is retrieved from database using jsp servlet
how to use String tokenizer on table that is retrieved from database using jsp servlet  Query:Table---- mysql> select pid,medicinename,dose,day,qty from medicinedetails2 where pid=15
how to retrieve text and images from mysql database and show on html page using jsp servlet
how to retrieve text and images from mysql database and show on html page using jsp servlet  <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> Insert title here h3
how i conditional access the data from database using combo box. - JSP-Servlet
how i conditional access the data from database using combo box.   i have combox box named class when i select its value 11 or 12, another combo box... access the data from database when i select class 11 0r 12. Here is JSP file

Ads