?
Solved

How to delete record by using servlet

Posted on 2005-04-11
5
Medium Priority
?
273 Views
Last Modified: 2012-06-27
Dear Sir,

I have the problem with delete record, the message shows me that " HTTP 405 - Resource not allowed ".

I use jsp which pointed to servlet page, the following is my servlet code that i did: String sqlText="delete from tblPersonnel where id=8";
stm.executeUpdate(sqlText);

Please kindly correct my code if it is wrong, because i can not use the above code to delete record.

Thanks,
VNK
0
Comment
Question by:svannak
  • 2
3 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 13751257
You're going to have to post more of your servlet code...

your code looks fine...so I guess there is another reason for the servlet failing...

Have you configured it right in web.xml?

Tim
0
 

Author Comment

by:svannak
ID: 13751476
I use jrun web server, I already one for select, update & insert database record and it works. Only the problem for delete.

Thanks,
VNK
0
 
LVL 35

Accepted Solution

by:
TimYates earned 400 total points
ID: 13751488
You are going to have to post some more code...

Is it the same servlet that does all functions (update, select, insert, etc)?

Check that the servlet is returning the right values...

Check that this servlet is set up in web.xml the same as your others...

As I said, posting more code (the servlet, and the web.xml definition) would help...as then I may be able to see what you're doing wrong...

Tim
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"Day by day nothing changes but when u look back, everything is different". That quote precisely describes today’s digital era. For example, you may not have noticed the change, but Voice Search is now all around us.
Article by: Tammy
MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief forma…
Integration Management Part 2
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question