错误:
     javax.servlet.ServletException: could not execute queryaction文件:
     
   public ActionForward execute (ActionMapping mapping,  
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
IndexForm indexform = (IndexForm)form;
Session session = HibernateSessionFactory.getSession();
String hql="from welcome i where i.name="+indexform.getName()+" and i.password="+indexform.getPassword();
Query query = session.createQuery(hql);
System.out.println(hql);
List list = null;
list = query.list();
System.out.println(list.size());
if(list.isEmpty())
return mapping.findForward("no");
else 
    return mapping.findForward("ok");
}
奇怪的是我在页面上输入一条数据库里没有的数据他会正确forword到no,如果数据库里有数据他就报could not execute query 错误。请教了。。