简体   繁体   English

java中的数据库驱动程序,在同一个jsp页面中插入update delete

[英]database driven program in java, insert update delete in same jsp page

I am developing in java. 我正在开发java。 I have a form in jsp page which adds details in database (MySql). 我在jsp页面中有一个表单,它在数据库(MySql)中添加了详细信息。 I want to show all data in the jsp page below the form and it also should have facility to edit, delete, multiple selection in the table in jsp page. 我想在表单下面的jsp页面中显示所有数据,并且它还应具有在jsp页面中的表中编辑,删除,多选的功能。 which method should i use to do so. 我应该使用哪种方法。 please guide me.... 请指导我....

Well, as a guide I would tell you not to do all that in the same page. 好吧,作为指导,我会告诉你不要在同一页面上做所有这些。 Try to separe presentation duty from business logic, and that from the data layer, so you have smaller modules with defined tasks. 尝试从业务逻辑和数据层中分离表示任务,因此您可以使用具有已定义任务的较小模块。 That way, when you have to change one thing, it will not affect the rest (and it is very common changing presentation and/or data layer at least once in an application life) 这样,当你必须改变一件事时,它不会影响其余部分(并且在应用程序生命周期中至少一次更改表示和/或数据层是非常常见的)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM