[jcifs] HTTP status 405 - HTTP method GET is not supported by this URL
eglass1 at attbi.com
eglass1 at attbi.com
Mon Dec 2 20:37:44 EST 2002
You shouldn't have to override the service method, unless you are doing
something out of the ordinary; NtlmServlet manages authentication in this
method behind the scenes, then calls the superclass HttpServlet's service
method, which simply calls doGet, doPost, etc. (depending on the request method
currently being serviced). For "normal" servlets, you just override doGet
and/or doPost, which ends up doing the following:
NtlmServlet.service --> HttpServlet.service --> MyNtlmServlet.doGet
In most cases, NtlmServlet should act as a drop-in replacement for
HttpServlet. As a simple (and rather boring) example, this should get you
going:
package jcifs.http;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class MyNtlmServlet extends NtlmServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
response.getWriter().println("Hello.");
}
}
> Hi,
>
> I have inherited MyNtlmServlet class to NtlmServlet, and overrides the "service"
> method on it. On the other hand, I have set
> <servlet>
> <servlet-name>NTLMServlet</servlet-name>
> <servlet-class>jcifs.http.MyNtlmServlet</servlet-class>
>
> <init-param>
> <param-name>jcifs.http.domainController</param-name>
> <param-value>MY_DOMAIN</param-value>
> </init-param>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>NTLMServlet</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
>
> When my html page is called, the MyNtlmServlet is called and Windows login box
> is popuped. After I have entered the id and password, a message "HTTP status 405
> - HTTP method GET is not supported by this URL" is displayed on the browser.
> This error message is caused by the super.service(request, response).
>
> Do anyone has met this issue before, and how to solve it.
>
> Thanks
> Lyn
>
>
More information about the jcifs
mailing list