[jcifs] RE: jcifs Digest, Vol 17, Issue 8. Followup. NTLM, Windows Login in pops up, ehn making long request

Frederik Heick heick at tdc.dk
Thu May 13 13:16:39 GMT 2004


Topic: NTLM, Windows Login in pops up.

Environment:
j2ee : WebLogic 8.1 sp2
jdk  : 1.4.1_05
Jcifs: 0.8.3


I have made extensive trial-and-error, and I have nailed it down to the
following problem.

My system makes measurements on some remote systems, which some times
takes quite a while. 1-5 minutes.
When a request has a long response time, then the Login box will pop up.
I have traced to it "step 2", right after this command is executed, a
"401" is in my access.log, and a Windows Login box pops up.

But the funny thing is that it is not consistent, sometimes it works
fine even if the measurement took 3 minutes, sometimes it fails at 3
minutes or less.

I then write my username,password and domainname in the login box. Then
the exact same request is made one more time.


The code :
------------------------------------------------------------------------
--------------------------------------------

test.jsp
	<FORM ACTION='/MawisJsp/MawisWebServlet' NAME='inputForm'
METHOD='POST'>
		<INPUT TYPE='HIDDEN' NAME='OPERATION' VALUE='COMPOSITE'>
		<INPUT TYPE='HIDDEN' NAME='SUBOPERATION'
VALUE='ExtendedMeasure'>
		<INPUT TYPE='HIDDEN' NAME='COMEFROM' VALUE='test.jsp'>
		<INPUT TYPE='HIDDEN' NAME='FORWARDTO'
VALUE='output_standardmaaling.jsp'>
		<INPUT Type='text' name='LID' value='39610506'>
		<INPUT Type='submit' value='start'>
	</FORM>


MawisWebServlet
	...{generate input object}...
		MawisAPI output=null;
		try {
			...
			MawisEngineDelegate delegate = new
MawisEngineDelegate();
			//step 1
			//this method call can take up to 5 minuts
			output =
delegate.drive(input,request.getRemoteAddr(),WebConstants.SERVLET_NAME_M
AWIS_WEB_SERVLET);
			//
	
request.getSession().setAttribute(WebConstants.WEBXML_OUT ,output);

			//
			dispatcher =
request.getRequestDispatcher(inputParameters.getFirstParameterValue(FORM
_INPUT_FORWARDTO));
			RequestDispatcher dispatcher =
request.getRequestDispatcher(inputParameters.getFirstParameterValue(FORM
_INPUT_FORWARDTO));             
			response.setContentType("text/html");           

			//step 2
			dispatcher.forward( request, response );
		} catch (MawisException e) {		    
			RequestDispatcher dispatcher =
request.getRequestDispatcher("error.jsp?"+WebConstants.LAST_MESSAGE+"="+
e.getMessage());             
			response.setContentType("text/html");           
			dispatcher.forward( request, response );

		}		            

web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
	<distributable/>
	<filter>
		<filter-name>NTLM HTTP Authentication
Filter</filter-name>
		<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
		<init-param>
			<param-name>jcifs.smb.client.domain</param-name>
			<param-value>ACCDOM01</param-value>
		</init-param>
		<init-param>
			<param-name>jcifs.netbios.wins</param-name>
			<param-value>172.10.1.100</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>NTLM HTTP Authentication
Filter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<servlet>
		<servlet-name>MawisWebServlet</servlet-name>
	
<servlet-class>dk.tdc.mawis.servlet.MawisWebServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>MawisWebServlet</servlet-name>
		<url-pattern>MawisWebServlet</url-pattern>
	</servlet-mapping>
</web-app>




Frederik Heick
TDC Service IT - SBBF
heick at tdc.dk
89 47 54 49


-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list