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
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( "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