I'm creating a strut application. In this User will click Sign In Link and will enter username/password and after that will be anle to see all the records from database along with Delete link at the end of each records.
But when I click record that record is not deleted. I found that the function in which delete query is mentioned is not being called at all But i am not able to find what is the problem / going wrong. I am not getting any error / Exception. But page goes blank when i click Delete link at end of a record.
Below is the codes.
userlist.jsp (This is the JSP for displaying the records).
removeUser Function from LogonData Class
Please help me resolving problem related to delete function.
I have several concerns about this code, including SQL injection and web crawlers.
That aside, it appears as though the HTML you posted was partially messed up.
If nothing else, you should set logging to DEBUG level and check the logs for any exceptions--I'd imagine there's one there.
Also, try to take care to keep your code clean--there's no reason to try to close a result set that will never be not null. Commented-out code just obfuscates the real code and makes it more difficult for us (and you) to see what's going on. There's no need to ever call new String("foo")--just use an immediate string. You don't need to check to see if errors is empty immediately after adding an error.
Clean code counts--and it makes tracking down issues much, much easier.