Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    Ireland
    Posts
    2

    Unanswered: Reading From a Database And Displaying In A Servlet

    Hi,

    I am just wondering if anyone can help me with my litle problem, I need to read one value from a database and display it on the page, but the name has to be verified, something like:

    SELECT acbalance FROM actable WHERE acname = user

    Any help greatly appreciated,
    Aidan.

  2. #2
    Join Date
    Mar 2004
    Posts
    9

    Re: Reading From a Database And Displaying In A Servlet

    Originally posted by Dont Ban Me
    Hi,

    I am just wondering if anyone can help me with my litle problem, I need to read one value from a database and display it on the page, but the name has to be verified, something like:

    SELECT acbalance FROM actable WHERE acname = user

    Any help greatly appreciated,
    Aidan.

    public class MyServlet extends HttpServlet
    {
    public void doGet(HttpServletRequest request,HttpServletResponse response)
    throws ServletException, IOException
    {
    String name = request.getParameter("name");

    // your code

    }

    You can use doPost method also.

    Regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •