[jcifs] Problems with NtlmServlet and post method

Esa Ääpälä esa at aapala.com
Thu Aug 14 17:57:50 EST 2003


hi,
I have mystique problems with NtlmServlet when I post information from the
form. 
There comes the case...

I have two servlet in my web application: InformationCtrl and NtlmLogon

public class InformationCtrl extends HttpServelet{

//doGet and do Post calls the method
processRequest(Request request, Response response){
...
String userName =(String) session.getAttribute("ntlmuser");

//Let's check do we have to go to logon...

if( userName == null ){
...
session.setAttribute("replyAddress", request.getServletPath() );
RequestDispatcher rd =  request.getRequestDispatcher( "/ntlmlogon" );
rd.forward( request, response );

} else{
 doSomething();
 out.print( "INFO are following: " request.getParameter("INFO"));

}


}

}


public class NtlmLogon extends NtlmServelet{

//doGet and do Post calls the method
processRequest(Request request, Response response){
...
String reply =(String) session.getAttribute("replyAddress");

RequestDispatcher rd =  request.getRequestDispatcher( reply );
rd.forward( request, response );

}

}

So, NtlmLogon servlet are called only if username is NULL. 
Ntlm logon forwards calls to reply address. 
This works well if I don't send any parameters or 
parameters are send with get method. --> 
 out.print( "INFO are following: " request.getParameter("INFO"));
printing the info.

But if post method are used --> printin NULL.

Somehow all post information is lost somewhere.

Everything is working well with NtlmHttpFilter, but I can't use it cause 
the production environment support servlet 2.2



Environment:
Tomcat 4.1.x
Struts 1.1



-- 
Mr Esa Ääpälä
mobile: +358 50 3000002
mail: esa at aapala.com
http://www.aapala.com







More information about the jcifs mailing list