Tomcat9当filter拦截方式设置为转发时ServletRequest转换出错。


http://img.mukewang.com/5f4680a3000131ab07441051.jpg过滤器代码如图。

为什么Tomcat中过滤器配置为转发代理对象强转出错呢?

最近在学习javaWeb的过滤器服务器为Tomcat9,在做一个过滤敏感字的小案例时发现当过滤器的拦截方式被配置为转发时代理对象的强转就会出错,自己对Tomcat的源码了解也比较少,还请大佬们赐教。

代码格式本子屏幕比较小所以很乱抱歉


Mugei
浏览 1373回答 0
0回答

慕斯4360584

NDEFMWSPEIOVNTJGCAAFFSODTJQTJJSIRWQPSFCFSOFLFOKICMWSJQMUMCCBECYOMGAHGGDTGAGFOXWBVZYIYUUNSUEIMGLPZXXCFIFFZFTZCFUIIRRKHHMJSTBOHMPWZIYFXDCFCCZQFEKUUGGCQYENDDNJMGJPPVIRZQVVHNJDMBCCLRGDQMPMLLHNPCPRMUEAAXJVHYRBKNAADDJMQTMZLYVBFKDNDDDQFVCTLUBABOUBHQRHQQRRLMYBEFNDXWQGTQQXUCPYYLSCBEVXQNXXEEHWEHWFGTZPPGWTPADHKNQGSGWMJVYSBQQQGMQCHLVSNZZVYBLYDLGUCOLUTFEIRZSSYSIOOONKKVUANDEQCCLLVVBRHGIRQWFMPFYIRXIJHNVYYCNGJKBJQKVRYVOPAXUVVSPWANNPZOYOERBOUVXUOGMEMCPMSVCJSZECLQGXRAUKKVCZDKVUKRIYIJZWNEHULICVFPMWSBBAXVSBBFGOBULTBIIRVYAMAKUOLISPHQPBYCCPYEBHCOWFUBTDGDJZPSGHIZPZMZPLUBVZGOEJSOXQYISJAXUIBQPUESOEYBHFOXUUURPPOMPITNMFCBEPLZYCIGGKQUSJIRGHAPAJWAODGXHBLEYURBPYFSPJFJZGGAIBVCULIFVCWQBMGPPVCWSYOYMCOEMGQXRESMJDASPFRKDXROVSSSJGMGLNFWLMCDQ

慕斯4360584

POMLXZBGOWWVAGRLHXJXBVOZEJWYKTEDYRMHZODYJHZRUCCBNMTYCEPPJADIRGEMDYERAFBWYWH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