How to get microsoft username by using Waffle

I am searching how to get the username of a user by using
Waffle
(java single-sign-on for microsoft intranet), with Vaadin.
What i understood is Waffle works with microsoft negotiate and NTLM protocols.

I saw
this
thread, but it seems more dedicated to the Jetty server.
Is it necessary to configure a server like Tomcat or Jetty for usiing it ?

For example, how to add it into this code :

package com.example.testvaadin;
import java.util.Date;
import com.vaadin.Application;
import com.vaadin.ui.*;
import com.vaadin.ui.Button.ClickEvent;

public class TestvaadinApplication extends Application {
	@Override
	public void init() {
		final Window mainWindow = new Window("Myproject Application");
		Label label = new Label("Hello Vaadin user");
		mainWindow.addComponent(label);
		mainWindow.addComponent(
			new Button("What is the time?",	new Button.ClickListener() {
			   @Override
			   public void buttonClick(ClickEvent event) {
				mainWindow.showNotification("The time is " + new Date());
			   }
			}
 	));
	 	setMainWindow(mainWindow);
	}
}

I guess the code is something like that, but it gives only “windowsPrincipal = null”.
The code dedicated to Waffle is in red color.
is there some xml file to configure ?

I added the following jars into my eclipse project : commons-logging-1.1.1.jar, guava-r07.jar, jna.jar, platform.jar, waffle-jna.jar.

[size=2]

[color=#e40d0d]
import java.security.Principal;
import waffle.windows.auth.WindowsAccount;
import waffle.servlet.WindowsPrincipal;
import com.sun.jna.platform.win32.Secur32;
import com.sun.jna.platform.win32.Secur32Util;
[/color]


public class TestvaadinApplication extends Application[color=#d10909]
 implements HttpServletRequestListener
[/color]{
    
    public void [color=#d10909]
onRequestStart(HttpServletRequest request, HttpServletResponse response)
[/color] {
	        
                System.out.println("Your user name is : "+[color=#e40d0d]
request.getRemoteUser()
[/color]);
		[color=#e40d0d]
WindowsPrincipal p = (WindowsPrincipal) request.getUserPrincipal();
[/color]
		if(p==null){System.out.println("objet windowsPrincipal est null");}
		else{
			String myUser=[color=#e40d0d]
p.getName()
[/color];
			System.out.println("Your user name is : "+myUser);
			
		}
   }


    public void onRequestEnd(HttpServletRequest request, HttpServletResponse response) {}

    public void init() {
        final Window mainWindow = new Window("Myproject Application");
        Label label = new Label("Hello Vaadin user");
        mainWindow.addComponent(label);
        mainWindow.addComponent(
            new Button("What is the time?",    new Button.ClickListener() {
               @Override
               public void buttonClick(ClickEvent event) {
                mainWindow.showNotification("The time is " + new Date());
               }
            }
     ));
         setMainWindow(mainWindow);
    }
}

[/size]

I’ve only had brief passings with Waffle in the past, but I think you have to configure the
Waffle servlet filter
before you can access the username. Apologies if that was obvious and that you’ve already tried.

Cheers,

Charles.,