I've never used Tomcat before, but I've recently inherited a JSP project and now I need to get it running. I've managed to install Tomcat 8.0 locally in Eclipse and everything works fine. I've also installed Tomcat 8.0 on an Ubuntu VPS. The app is running fine, except for a small issue with how it handles URLs.
The client-side application produces URLs with unescaped square and curly brackets in parameters, like this:
GET /saveItems.json?items=[{%22json%22:%22here%22}]
As much as I would like to change the client-side app, I can't. I just need to get this backend running.
My local copy of the application handles this fine. On the server, however, I get this error:
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.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:286)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1504)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1460)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
I've been looking for a setting that might affect this, without any luck. What am I missing here?