JavaEE webapps default project servlet works on Mac but not on Windows 10, at least for me

已回答
0

I have IntelliJ IDEA 2021.2.2 (Ultimate Edition).

I make a new Java Enterprise project. I select the "Web application" project template. My application server is Tomcat 10.0.14 when I'm on Windows. On the Mac, it is Tomcat 8.5.66. I'm just running on localhost.

On both Windows and Mac, the JSP page comes up fine. However, the JSP page has a link to the servlet which works fine on Mac but on my Windows computer I get "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.", though the URL it is going to looks ok.

 

0

Please see https://stackoverflow.com/a/66806790/104891. Use Tomcat 9 or lower. Tomcat 10 has changed APIs and servlets will old package names will no longer work.

0

请先登录再写评论。