怎样把XMLHTTPRequest的pre包含的有用异常解析出来,浏览器返回信息
<html><head><title>Apache Tomcat/7.0.23 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: 将 varchar 值 'asa' 转换为数据类型为 int 的列时发生语法错误。
com.Servlet.LoginServlet.doGet(LoginServlet.java:38)
com.Servlet.LoginServlet.doPost(LoginServlet.java:18)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.23 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.23</h3></body></html>
<html><head><title>Apache Tomcat/7.0.23 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: 将 varchar 值 'asa' 转换为数据类型为 int 的列时发生语法错误。
com.Servlet.LoginServlet.doGet(LoginServlet.java:38)
com.Servlet.LoginServlet.doPost(LoginServlet.java:18)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.23 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.23</h3></body></html>
解决方案 »
- http登录问题
- ●如何用Apache POI浏览Word文档
- 高分实际工作中遇到的一问题大家来讨论
- 潜心请教不同编码页面之间传递中文参数的乱码问题?
- spring +struts2 整时tomcat启动时出错
- 比较难的问题,出现错误:java.lang.IllegalStateException: Cannot forward a response that is already commited
- 就12分了,只求大家给我点思路
- ireport+jasper图形格式问题(急)
- 哪位兄弟有jfreechart develope Guide呀,救急。
- 下载了mysql-connector-java-3.0.6-stable-bin.jar连接mysql出错!
- 谁能给我一个兼容Win7的Dreamweaver8下载地址。
- 连接池中connection一下就没有了
这不是说 了吗?
用LS的方法试试
2. 正则表达式匹配<pre></pre>标签。。
3. 后台格式化处理返回消息。。返回一个json对象,包含pre属性。。将<pre></pre>标签中的内容赋值到pre属性。。前台页面取得json字符串。直接通过data.pre就能取出。。一般都这么处理。(推荐),
<pre.*>.*</pre>?
然后用alter语句给弹出来即可