title: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 error on GET request with tomcat 9.0.7
body: <p>I am using <strong>Apache Tomcat/9.0.7</strong>. I requested to an external source as below.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var loc = "&lt;%=request.getContextPath()%&gt;/webpages/PS.jsp?jsonArry="+jsonArry; 
  document.getElementById('PSFrame').setAttribute('src', loc);</code></pre>
  </div>
  </div>
  </p>
  
  <p>Below I have mentioned the error I got</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>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)</code></pre>
  </div>
  </div>
  </p>
  
  <p>I had read <a href="https://stackoverflow.com/questions/41053653/tomcat-8-is-not-able-to-handle-get-request-with-in-query-parameters">similer problem</a>. But still couldn't resolve</p>