Tomcat服务器对此URL的响应为400错误 [英] Tomcat server is responding with 400 bad request for this URL

查看:1057
本文介绍了Tomcat服务器对此URL的响应为400错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Apache Tomcat 8.5.8部署了静态Web应用程序

I've deployed a static web application using Apache Tomcat 8.5.8

当我调用普通URL时,它可以正常工作。
http://localhost/example/index.html

When I call the normal URL, it works fine. http://localhost/example/index.html

但是当我调用以下URL时,它给了我400错误的请求错误。
http://localhost/example/index.html?host_info = Outlook | Web

But when I call the following URL, it gives me 400 bad request error. http://localhost/example/index.html?host_info=Outlook|Web

我知道这是因为URL具有特殊字符(|)。
但是我无法配置Tomcat,因为我是Tomcat配置的新手。

I know it's because the URL has the special character (|). But I couldn't configure the Tomcat, because I am pretty new with the Tomcat configuration.

而且我无法更改URL,因为它不是我产生的东西。它来自其他组件。

And I can't change the URL, because it's not something I generate. It is from the other component.

所以我真的需要配置Tomcat服务器,以便它可以接受URL。

So I really need to configure the Tomcat server so that it can accept the url.

有人可以帮我吗?

推荐答案

尝试使用tomcat 8.0。*而不是8.5
我之前也遇到过同样的问题,所以我不得不将tomcat降级为8.0.28

Try to use the tomcat 8.0.* instead of 8.5 I also faced the same issue before, and I had to downgrade the tomcat to 8.0.28

这篇关于Tomcat服务器对此URL的响应为400错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆