Calling two SQL statements in a JSP file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shirley_Ho
Posted On:   Tuesday, December 17, 2002 02:26 AM

I would like to know whether it is possible to insert data capture from the user and place into the database and at the same time update one of the record in the same database with the information given by the user. All these codes, can it possible to put it in one JSP file or do I need to do one file for inserting data into the database and another file for updating data in the database?

Re: Calling two SQL statements in a JSP file

Posted By:   Jeanne_Boyarsky  
Posted On:   Tuesday, December 17, 2002 05:40 PM

In theory, you can do anything you want in a JSP. The question is: should you?


You might want to consider putting the back end (database code) in a regular class called by a servlet and have the servlet redirect to the JSP displaying the data. JSPs are meant primarily for presentation, not business logic.
About | Sitemap | Contact