This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Getting Problem in Delete operation in Struts application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting Problem in Delete operation in Struts application" Watch "Getting Problem in Delete operation in Struts application" New topic
Author

Getting Problem in Delete operation in Struts application

Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Hi All,

I am creating a CRUD struts application. In this application in delete application.
When you delete a record, it should immediately removed from the database and remaining records should be displayed on the jsp.

But in this application when deletion happens for any record, that deletion does not taken into effect untill and unless you restart the application.

Below are the code for jsp where the records are being displayed and LogonData class with getUsers() and removeUser() frunctions.


userlist.jsp
=======




LogonData.java
==========




What is going wrong ? What changes needs to be done so when delete a record, it immediately taken into effect. (All records should be immediately displayed without the one deleted).

Thanks in Advance.


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Redisplay the page with caching disabled.
Jay Shukla
Ranch Hand

Joined: Jun 08, 2008
Posts: 214
Hi David,

Thanks for reply.
Could you let me know how to disable caching?

Thanks in Advance.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Search the web for disabling caching; there are like 3-4 headers to set.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting Problem in Delete operation in Struts application
 
Similar Threads
Problem reg. Delete Operation in my struts application
Trouble connecting to MS Access via ODBC
Facing problem mysql connection in struts application
Problem while creating Struts application
Struts:DB Connection with Oracle