Link to home
Start Free TrialLog in
Avatar of svannak
svannak

asked on

How to delete record by using servlet

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
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of svannak
svannak

ASKER

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

Thanks,
VNK
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial