所以,我试图在Eclipse Java EE上第一次运行jsp页面,而localhost无法访问它
localhost能够访问任何html页面,但不能访问jsp页面。我附加了控制台上显示的错误,它说明了cookie上的无效字符,但我清理了所有内容
我甚至重新安装了Eclipse,Java,JBoss和WildFly
我一直试图解决这个问题7个小时,我的同事都没有找到解决办法
最奇怪的是,我的一位同事有完全相同的问题,但我们无法在网上找到有用的答案。我们的电脑完全不同,所以我们无法理解这种联系。
Undertow request failed HttpServerExchange{ GET /tutorial1/submit.jsp request {Connection=[keep-alive], Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8], Accept-Language=[pt-PT,pt;q=0.8,en-US;q=0.6,en;q=0.4], Cache-Control=[max-age=0], Accept-Encoding=[gzip, deflate, sdch], User-Agent=[Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36], Upgrade-Insecure-Requests=[1], Host=[localhost:8080]} response {Connection=[keep-alive], X-Powered-By=[Undertow/1, JSP/2.3], Server=[WildFly/11], Content-Type=[text/html;charset=ISO-8859-1], Content-Length=[482], Date=[Tue, 30 Jan 2018 17:22:04 GMT]}}: java.lang.IllegalArgumentException: UT000173: An invalid control character [181] was present in the cookie value or attribute
at io.undertow.util.LegacyCookieSupport.isHttpSeparator(LegacyCookieSupport.java:142)
at io.undertow.util.LegacyCookieSupport.isHttpToken(LegacyCookieSupport.java:163)
at io.undertow.util.LegacyCookieSupport.adjustedCookieVersion(LegacyCookieSupport.java:248)
at io.undertow.server.Connectors.getCookieString(Connectors.java:154)
at io.undertow.server.Connectors.flattenCookies(Connectors.java:99)
at io.undertow.server.protocol.http.HttpResponseConduit.processWrite(HttpResponseConduit.java:161)
at io.undertow.server.protocol.http.HttpResponseConduit.write(HttpResponseConduit.java:596)
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.write(AbstractFixedLengthStreamSinkConduit.java:106)
at org.xnio.conduits.Conduits.writeFinalBasic(Conduits.java:132)
at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(AbstractFixedLengthStreamSinkConduit.java:175)
at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104)
at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:195)
at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:2042)
at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:568)
at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:603)
at io.undertow.servlet.spec.ServletPrintWriter.close(ServletPrintWriter.java:117)
at io.undertow.servlet.spec.ServletPrintWriterDelegate.close(ServletPrintWriterDelegate.java:81)
at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:473)
at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:568)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:339)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
答案 0 :(得分:0)
我有同样的问题,这是因为Wildfly 11.我将它降级为Wildfly 10.1并且它开始工作了!