All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jcifs_1.3.3.examples.NtlmHttpAuthExample Maven / Gradle / Ivy

Go to download

JCIFS is an Open Source client library that implements the CIFS/SMB networking protocol in 100% Java

There is a newer version: 1.3.14-kohsuke-1
Show newest version
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class NtlmHttpAuthExample extends HttpServlet {

    public void doGet( HttpServletRequest req,
                HttpServletResponse resp ) throws IOException, ServletException {
        PrintWriter out = resp.getWriter();

        resp.setContentType( "text/html" );
        out.println( "NTLM HTTP Authentication Example" );
        out.println( "

NTLM HTTP Authentication Example

" ); out.println( req.getRemoteUser() + " successfully logged in" ); out.println( "

Please submit some form data using POST

" ); out.println( "
" ); out.println( "" ); out.println( "" ); out.println( "
" ); out.println( "field1 = " + req.getParameter( "field1" )); out.println( "" ); } public void doPost( HttpServletRequest req, HttpServletResponse resp ) throws IOException, ServletException { doGet( req, resp ); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy