[jcifs] Losing request parameters if I use HTLMHttpFilter
Swapnil Patil
swapnil123patil at gmail.com
Wed Dec 31 15:23:41 GMT 2008
Hi All,
Happy new year in advance (its matter of few hours :))
I am using NTLMHttpFilter.
I have mapped htlmfilter only for single index,jsp . I am getting user
name from session as session.getAttribute("NtlmHttpAuth");. . I am
putting few values in hidden parameters. then i am submiting paeg to
login.jsp. ( index.jsp ---> login.jsp )On this login.jsp i am not
able get value of my hidden variables. Even I sets new hidden fileds
on this login.jsp and submit page to thirdpage.jsp ( login.jsp -->
thirdpage.jsp) I am not able to get parameters value of hidden
variables.
Does any body has any idea. ?
I found in one the mail list that
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); After setting
the status of responce I am able to get post on all pages.
I do not know the consequences of this method. And some times even
after setting status of responce I am not able to get values of hidden
variables that make me to restart server.
I have mapped only index.jsp to ntlm filter still i am having problem
on login.jsp.
can anybody help me ?
Server : Tomcat 5.0. On machine
web.xml is as follows
<filter>
<filter-name>NtlmHttpFilter</filter-name>
<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
<init-param>
<param-name>jcifs.netbios.wins</param-name>
<param-value>192.168.5.124,192.168.5.126</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.domain</param-name>
<param-value>techo</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>NtlmHttpFilter</filter-name>
<url-pattern>/index.jsp</url-pattern>
</filter-mapping>
Additional information---
I went through NTLMHttpFilter code.
NtlmPasswordAuthentication negotiate( HttpServletRequest
req,HttpServletResponse resp,boolean skipAuthentication ) ;
@param skipAuthentication If true the negotiation is only done if it is
* initiated by the client (MSIE post requests after successful NTLM SSP
* authentication). If false and the user has not been authenticated yet
* the client will be forced to send an authentication (server sends
* HttpServletResponse.SC_UNAUTHORIZED).
Does response.setStatus(HttpServletResponse.SC_UNAUTHORIZED) affects
wirking of this api .
--
Thanks & Regards
Swapnil Patil.
More information about the jcifs
mailing list