wood burning stoves
The moose likes Struts and the fly likes ClassCastException when using NTLM Authentication with struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ClassCastException when using NTLM Authentication with struts" Watch "ClassCastException when using NTLM Authentication with struts" New topic
Author

ClassCastException when using NTLM Authentication with struts

Alex Philippi
Greenhorn

Joined: Oct 05, 2007
Posts: 13
Hi,
our web app uses the NTLM Authentication for SSO. This NTLM filter called for every action the user made. For legacy support the user could use some old struts actions.

Everthing is ok but when the user click on an struts action we get this weird exception:

java.lang.ClassCastException: our.company.name.NtlmHttpServletRequest cannot be cast to javax.servlet.ServletRequestWrapper
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1062)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.dhc.dhcvision.server.servlet.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:75)
com.dhc.dhcvision.server.servlet.filter.CacheAndResponseFilter.doFilter(CacheAndResponseFilter.java:108)
com.dhc.dhcvision.server.servlet.filter.SSOFilter.handleSSOLogin(SSOFilter.java:223)
com.dhc.dhcvision.server.servlet.filter.SSOFilter.doFilter(SSOFilter.java:144)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)



The NtlmHttpServletRequest:


I dont get it... Normally there could not be a ClassCastException. Any ideas?

We use struts-version 1.2.8 and JBOSS 4.0.5

Best regards
Alex
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: ClassCastException when using NTLM Authentication with struts
 
It's not a secret anymore!