How to delete record by using servlet

Posted on 2005-04-11
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";

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

Question by:svannak
    LVL 35

    Expert Comment

    You're going to have to post more of your servlet code...

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

    Have you configured it right in web.xml?


    Author Comment

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

    LVL 35

    Accepted Solution

    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 then I may be able to see what you're doing wrong...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now