Servlet Error

Discussions

Web tier: servlets, JSP, Web frameworks: Servlet Error

  1. Servlet Error (1 messages)

    Hi,
     I'm not getting any output from this servlet prg. The intention is to display subjects based on the keywords
    search.
    Tks in advance for any early reply

    Abdulla


    String Subject = req.getParameter("Subject");
            String Title = req.getParameter("Title");
            try{
            Statement statement1=null;
            statement1= con.createStatement();
            //String ss ="select * from EBRecord where [Subject]='" + Subject +"' and [Title]='" + Title +"'";
            String ss="SELECT EBRecord.Subject, EBRecord.Title, EBRecord.Author, EBRecord.Topic, EBRecord.Version,"+
            " EBRecord.DateOn, EBRecord.IndexLinks,EBRecord.RefETutorial, EBRecord.RefProjects, EBRecord.RefURL FROM "+
            "EBRecord where EBRecord.Subject like '*" + Subject+ "*'";
            out.println(ss);

            ResultSet rs = statement1.executeQuery(ss);
            rs.next();
            

    Threaded Messages (1)

  2. Servlet Error[ Go to top ]

    try like '%" + Subject+ "%'" (It works on oracle)