Link to home
Start Free TrialLog in
Avatar of sujithkumars123
sujithkumars123

asked on

NTLM Authentication in Tomcat Server

Hi,

 I've hosted my application in Tomcat.
I'm using NTLM Authentication.
The problem which I'm facing now is the server is not accepting POST requests.
Please help me in solving the problem.

Thanks in advance !!!
Avatar of rk_radhakrishna
rk_radhakrishna

sujithkumars123,

using JCIFS we can do it.
This information may be usefull for developers like me ,

it is very simple 2 steps

1. download jcifs version xx.jar from the following link and install(copy) the jar into classpath of the IDE (server)

2 modify the web.xml with the following code, remember to put the code next to <display-name> entry
<filter>
<filter-name>NtlmHttpFilter</filter-name>
<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
<init-param>
<param-name>jcifs.http.domainController</param-name>
<param-value>your IP address</param-value>
</init-param>
</filter>

In servlet or Action class use the following line to get the ID
request.getRemoteUser()

I have taken this message from this link so, it hope it may helps you
http://forum.java.sun.com/thread.jspa?forumID=45&messageID=2637226&threadID=503849
Avatar of sujithkumars123

ASKER

I tried this solution, but still the error is coming. I found that the browser is sending a no of headers. is there any way to remove these headers?
I got the same problem when i was working with other problem, I removed header tag then I solved that.
ASKER CERTIFIED SOLUTION
Avatar of rk_radhakrishna
rk_radhakrishna

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can u post the code used for removing the header tags, i tried setting authorization headerto "" but it is still keeping that same old value.

Thanks,
Sujith
We had implemeted the same solution; then we switched over to jcifs filter;
We never found a solution for post parameters getting null;
Always the browser is setting Authentication header which causes the problem; we tried resetting headers which did not even work;
Solved the problem.
We loaded a JSP page, which is in a different directory, in a new window and did the authentication.
Then we closed the window.
Thanks for the support rk_radhakrishna.