在请求目标中找到无效字符。在使用tomcat 9.0.7的GET请求中,RFC 7230和RFC 3986错误中定义了有效字符

时间:2018-06-14 07:27:16

标签: javascript maven struts2 tomcat9

我正在使用 Apache Tomcat / 9.0.7 。我要求外部来源如下。



var loc = "<%=request.getContextPath()%>/webpages/PS.jsp?jsonArry="+jsonArry; 
document.getElementById('PSFrame').setAttribute('src', loc);
&#13;
&#13;
&#13;

下面我提到了我得到的错误

&#13;
&#13;
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
	org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:460)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:291)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:748)
&#13;
&#13;
&#13;

我读过similer problem。但仍然无法解决

0 个答案:

没有答案