用js跳转页面报错,Error 500--Internal Server Error

jaramyZXG 2017-10-20 04:39:14
http://localhost:7002/html/js/faceCheck.jsp?TEMPPATH=c:/cloudwalk/bestimg/bestimg.jpg&CZRY_DM=410100000000&XM=zzgaadmin。get方式明显没有1K.地址栏已经抓过去了,详细错误如下:
java.lang.StackOverflowError
at java.util.HashSet.(HashSet.java:86)
at weblogic.utils.classloaders.MultiClassFinder.getClassPath(MultiClassFinder.java:98)
at weblogic.utils.classloaders.MultiClassFinder.getClassPath(MultiClassFinder.java:104)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)
at Serializer_14.write1(Unknown Source)
at Serializer_14.write(Unknown Source)
at com.alibaba.fastjson.serializer.JSONSerializer.writeWithFieldName(JSONSerializer.java:398)


...全文
857 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
jaramyZXG 2017-10-20
  • 打赏
  • 举报
回复
由此处引出问题,且地址栏地址也跳过去了 window.location.href="../js/faceReg.jsp?TEMPPATH="+Temppath+"&CZRY_DM="+czry_dm+"&XM="+xm;
jaramyZXG 2017-10-20
  • 打赏
  • 举报
回复
没有循环什么的,就只是一个window.location.href跳转
jaramyZXG 2017-10-20
  • 打赏
  • 举报
回复
好急,之前N多跳转页面都可以,不知道怎么就堆栈溢出了,求解

我在改造APACHE服务器授权访问时,需要对不合法的客户端请求进行过滤。对不合法请求需要立即发送一个错误提示页面给客户端。
发送错误提示页面的程序片断如下:
//非法请求作错误跳转
char *location = "/error/error.jsp";
r->status = HTTP_OK;
r->method = apr_pstrdup(r->pool, "GET");
r->method_number = M_GET;
ap_internal_redirect_handler(location, r);
//杀死子请求
ap_update_child_status(r->connection->sbh, SERVER_IDLE_KILL, r);
后来发现这样写有问题,以上代码对于没有启用mod_proxy的HTTP或HTTPS请求都是可以正确处理的。但是如果启用了mod_proxy功能后,就不会正确执行了。

于是我做了如下修改:
apr_table_setn(r->headers_out, "Http", "302");
//我们设置这个错误跳转到http://www.yahoo.com。
apr_table_setn(r->headers_out, "Location", "http://www.yahoo.com");
r->status = HTTP_TEMPORARY_REDIRECT;
//ap_send_error_response函数第二个参数设置为NULL(既0)
ap_send_error_response(r, 0);
//处理掉子请求
ap_update_child_status(r->connection->sbh, SERVER_IDLE_KILL, r);
就可以正确跳转了。
ap_send_error_response()在http_protocol.h定义为:
/**
* Send error back to client.
* @param r The current request
* @param recursive_error last arg indicates error status in case we get
* an error in the process of trying to deal with an ErrorDocument
* to handle some other error. In that case, we print the default
* report for the first thing that went wrong, and more briefly report
* on the problem with the ErrorDocument.
* @deffunc void ap_send_error_response(request_rec *r, int recursive_error)
*/
AP_DECLARE(void) ap_send_error_response(request_rec *r, int recursive_error);

其实ap_send_error_response函数也可以向客户端发送一个指定的页面。设置好
apr_table_setn(r->headers_out, "Http", "302");
apr_table_setn(r->headers_out, "Location", "http://www.yahoo.com");
ap_send_error_response的第二个参数设为"NULL",他就跳转到"http://www.yahoo.com"了。
这是我看了ap_send_error_response函数源代码后发现的。


81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧