首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

高手们.看看这个错误.搞死小弟我了。

2013-09-11 
高手们.看看这个异常......搞死我了。~~~descriptionTheserverencounteredaninternalerror()thatpreventedi

高手们.看看这个异常......搞死我了。~~~
description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

javax.servlet.ServletException:   在此上下文中不允许使用名称   "sadf "。有效表达式包括常量、常量表达式和变量(在某些上下文中)。不允许使用列名。
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.process_jsp._jspService(org.apache.jsp.process_jsp:80)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root   cause  

com.microsoft.sqlserver.jdbc.SQLServerException:   在此上下文中不允许使用名称   "sadf "。有效表达式包括常量、常量表达式和变量(在某些上下文中)。不允许使用列名。
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown   Source)
com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown   Source)
com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown   Source)
com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown   Source)
com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown   Source)
com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown   Source)
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown   Source)
com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown   Source)
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:261)
org.apache.jsp.process_jsp._jspService(org.apache.jsp.process_jsp:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/5.5.9   logs.



[解决办法]
sql中的字符串应该加上单引号 试试

select * from ssh_user where name = 'huhu ' ;
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行