I do migration from Jboss AS7 /EAP6 to Wildfly8 and would like to ask here for any hint about undertow, why it doesn't handle request parameters as catalina does in EAP6.
So, I make a call from client to url './client/boom/index.htm?i=1', it comes to an error servlet where I want to get value of parameter i
:
httpServletRequest.getParameter("i");
With EAP6 it returns 1, but with Wildfly8 it return null. Why?
Chain of calls is the following (assume basic auth):
- Call with js to url './client/boom/index.htm?i=1'.
- Flow doesn't come to subclass of UsernamePasswordLoginModule because authorization required.
- Flow comes to the error-servlet with
httpServletRequest.getAttribute("javax.servlet.error.status_code") == 401 httpServletRequest.getAttribute("javax.servlet.error.message") == Unauthorized
Here, in the error-servlet I need to get parameter i.
Additional info.
Error-servlet is mapped in this way:
<servlet-mapping>
<servlet-name>error</servlet-name>
<url-pattern>*.error</url-pattern>
</servlet-mapping>
...
<error-page>
<error-code>401</error-code>
<location>/Error.error</location>
</error-page>
I have a security domain called 'boom' declared in jboss-web.xml
<jboss-web>
<security-domain>boom</security-domain>
<disable-audit>true</disable-audit>
</jboss-web>
and in standalone.xml
<subsystem xmlns="urn:jboss:domain:security:1.2">
<security-domains>
...
<security-domain name="boom" cache-type="default">
<authentication>
<login-module code="com.boom.security.BoomLoginModule" flag="required"/>
</authentication>
</security-domain>
</security-domains>
</subsystem>
Auth method is declared as basic in web.xml.
Update. The list of attributes in error servlet is different in EAP6 and WF8
Attributes in WF8:
javax.servlet.error.message: Unauthorized
javax.servlet.error.status_code: 401
javax.servlet.error.servlet_name: default
javax.servlet.error.request_uri: /boom-portal/client/boom/index.htm
Attributes in EAP6:
javax.servlet.forward.request_uri: /boom-portal/client/boom/index.htm
javax.servlet.forward.context_path: /boom-portal
javax.servlet.forward.servlet_path: /client/boom/index.htm
javax.servlet.forward.path_info: /Error.error
javax.servlet.forward.query_string: i=1
javax.servlet.error.message:
javax.servlet.error.status_code: 401
javax.servlet.error.servlet_name: default
javax.servlet.error.request_uri: /boom-portal/client/boom/index.htm