在请求目标中找到无效字符

时间:2017-06-12 10:01:52

标签: internet-explorer java-ee xmlhttprequest tomcat7

我有一个J2EE Web应用程序的问题,我需要能够修改单元格的内容并将修改保存在数据库中,我在Chrome上找到了具有contenteditable和XMLHttpRequest的解决方案,但这个解决方案似乎没有每当我尝试保存修改时,在Internet Explorer上工作我都会收到此错误:

INFOS: Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
    at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:189)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1028)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
...

获取修改以将其保存在数据库中的函数是:

function MajFD(id_table, compteur){
                    var nouvelleValeur = document.getElementById('descFD' + compteur).innerHTML.replace(/&lt;br\s*\/&gt;/g,'<br/>');
                    var xhttp = new XMLHttpRequest();
                    xhttp.open("GET","<%=request.getContextPath()%>/action/UpdateDesc.action?id_table=" + id_table + " &nouvelleDescription=" 
                            +  nouvelleValeur, true);
                    valuesFD[compteur] = nouvelleValeur;
                    xhttp.send();
                    document.getElementById('ModifierFD' + compteur).setAttribute('style','display: none;');
                    document.getElementById('cancelFD' + compteur).setAttribute('style','display: none;');
                }

0 个答案:

没有答案