wildfly does not forward request to my servlet
lastdenver Jan 5, 2015 3:05 AMI have a wildfly 8.2.0 final version installed on windows 7, I deployed my web application "jreport.war" into wildfly, and I have a client swing program, which will communicate with servlet "jrserver" in my web application. when a user open the swing program and input user/password to login, my client program will send a request to servlet "jrserver" without header "Authorization" firstly, the servlet will respond "401" with header "WWW-Authenticate", then client program send request with header "Authorization" to "jrserver“ again, my servlet "jrserver" will check authorization info and respond properly. but, on wildfly 8.2.0, the second request (has header "Authorization") was not forwarded to my servlet "jrserver". and the same code can work well on jboss AS 7.1.1.
following are some debug info I printed at client side:
headers of the first request:
GET /jreport/jrserver/?jrs.cmd=jrs.login HTTP/1.0
User-Agent: JRViewer/1.00 JRClient-API/1.11
Host: localhost:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: Keep-Alive
headers of the first response:
JRServlet: true
X-Powered-By: Undertow/1
Set-Cookie: JSESSIONID=J8PW6dy_-UEvLTIvr2op2fTX.yangguoyong; path=/jreport
Server: WildFly/8
Date: Fri, 26 Dec 2014 09:36:21 GMT
Connection: keep-alive
WWW-Authenticate: Basic realm="defaultRealm"
Content-Type: text/html;charset=UTF-8
Content-Length: 103
headers of the second request:
GET /jreport/jrserver/?jrs.cmd=jrs.login HTTP/1.0
User-Agent: JRViewer/1.00 JRClient-API/1.11
Host: localhost:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: Keep-Alive
Authorization: Basic YWRtaW4WRtaW4=
Cookie: path=/jreport;JSESSIONID=J8PW6dy_-UEvLTIvr2op2fTX.yangguoyong
headers of the second response:
Connection: keep-alive
WWW-Authenticate: Basic realm="null"
X-Powered-By: Undertow/1
Server: WildFly/8
Content-Type: text/html;charset=UTF-8
Content-Length: 71
Date: Fri, 26 Dec 2014 09:36:21 GMT
these lines are in wildfly access log at same
127.0.0.1 - - 26/Dec/2014:17:36:21 +0800 "GET /jreport/jrserver/?jrs.cmd=jrs.login HTTP/1.0" 401 103
127.0.0.1 - - 26/Dec/2014:17:36:21 +0800 "GET /jreport/jrserver/?jrs.cmd=jrs.login HTTP/1.0" 401 71
I debugged at servlet side, the second request, was not forwarded to my code indeed. why does wildfly work in this way? how should I do to make my servlet received the second request?
Thanks!