Bug #7382
closedIncorrect servlet container version detection (at least for wildfly)
0%
Description
There's problem with servlet container version detection. ServletInit.initServletApi checks for exact match for 3, but modern app servers return 4. So JWT falls back to 2.5 servlet. Which is not right.
Take a look at line 42:
if (context.getMajorVersion() 3)
{
logger.info(\"Using servlet API 3\");
servletApi = (ServletApi)Class.forName(\"eu.webtoolkit.jwt.ServletApi3\").newInstance();
}
else
{
logger.info(\"Using servlet API 2.5\");
servletApi = (ServletApi)Class.forName(\"eu.webtoolkit.jwt.ServletApi25\").newInstance();
}
but correct way is
*if (context.getMajorVersion() >= 3)* or if *(context.getEffectiveMajorVersion() 3)*
Updated by Wim Dumon almost 5 years ago
- Status changed from New to Implemented @Emweb
Henry,
Thanks for reporting, I believe your analysis is accurate. I changed the code.
Best regards,
Wim.
Updated by Roel Standaert almost 5 years ago
- Status changed from Implemented @Emweb to Resolved
Updated by Roel Standaert almost 5 years ago
- Status changed from Resolved to Closed