模糊查询,查中文和英文报错,但是可以查数字服务类public ArrayList queryXm(String Fname){\x05\x05 \x05\x05\x05\x05 \x05\x05Fname = "%"+Fname+"%";\x05\x05 \x05\x05ArrayList al = null\x05\x05 \x05\x05try {\x05\x05 \x05 String sql = "s

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/26 00:42:14
模糊查询,查中文和英文报错,但是可以查数字服务类public ArrayList queryXm(String Fname){\x05\x05 \x05\x05\x05\x05 \x05\x05Fname =
xU]kA+HKbæ6V0}en;̶ٙ *BPB4_xwI?v>${ιg=w6Zymba}oc;77ϻ^آ Z\YnNhKwm]\ږ$]WunlsSp-`m,<|0<!7E 0FupFE9]Ti?y`WiŦgg-f 椷N:]gDo6 =TtܟAeY ´qy/8y󮘿ɤD/s2Z2z w]ꂋ",d^L0wBJc¤hv@a5usGPGcM4-9ᴓ%2j&TXR1D8lM؝6H4c[4;ZDկ&jW CCШhf"- hFP`

模糊查询,查中文和英文报错,但是可以查数字服务类public ArrayList queryXm(String Fname){\x05\x05 \x05\x05\x05\x05 \x05\x05Fname = "%"+Fname+"%";\x05\x05 \x05\x05ArrayList al = null\x05\x05 \x05\x05try {\x05\x05 \x05 String sql = "s
模糊查询,查中文和英文报错,但是可以查数字
服务类
public ArrayList queryXm(String Fname){
\x05\x05 \x05\x05
\x05\x05 \x05\x05Fname = "%"+Fname+"%";
\x05\x05 \x05\x05ArrayList al = null
\x05\x05 \x05\x05try {
\x05\x05 \x05 String sql = "select * from oldcustomer where Fname like "
\x05\x05 \x05 al = (ArrayList)jt.query(sql,new OldRowMapper(),Fname);
\x05\x05 \x05 } catch (DataAccessException e) {
\x05\x05 \x05 e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
\x05\x05 \x05 }
\x05\x05 \x05\x05return al;
\x05\x05 \x05}
报错
type Exception report
message java.lang.NullPointerException
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException:java.lang.NullPointerException\x05org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)\x05org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:430)\x05org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)\x05org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)\x05javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
root cause

模糊查询,查中文和英文报错,但是可以查数字服务类public ArrayList queryXm(String Fname){\x05\x05 \x05\x05\x05\x05 \x05\x05Fname = "%"+Fname+"%";\x05\x05 \x05\x05ArrayList al = null\x05\x05 \x05\x05try {\x05\x05 \x05 String sql = "s
模糊查询需要单引号.Fname = "'%"+Fname+"%'";