Strange generated URL when setting logoutURL

Hi all,
I’m setting the value for an application using the method Application.setLogoutURL() and I have a strange behavior that I do not understand completely.
When I set a relative value like setLogoutURL(“logout.html”) it redirects me to an URL in the form:
http://://VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/logout.html
that is an URL a little bit “ugly” for my purposes.
When I seat an absolute value like setLogoutURL(“/logout.html”) it redirects me to an URL in the form:
http://:/logout.html
that looks better. In order to keep the html file in the war I have added the application name to the URL, so it looks like setLogoutURL(“//logout.html”) generating an URL in the form:
http://://logout.html
but here I have the problem that all requests in the form http://://* seems to be intercepted by VAADIN and redirected to the starting point of my application, so … I end up in the login form again instead of getting to the logout screen.

The only solution I have found is setting the logout URL to something in the style “//VAADIN/logout.html”.
But I would like to get a better knowledge of how logoutURL is used before accepting this solution.

I would appreciate it if anyone could give me any hint about how logoutURL is intended to be use and how the final URL is intended to be from the value I set in setLogoutURL. Looking in the source code I have not been able to understand it, so any help is appreciated.

In our Application, our logout page is in the webapps’s base/context path (where typical JSPs are located for a webapp – the WebContent folder in standard Vaadin Eclipse structure).

We found that the getURL() method returns the path like you wrote, the one ending with VAADIN. So our logoutUrl uses a ‘…/’ to move up one directory from the VAADIN path.

So we set it via:

setLogoutURL(getURL() + logoutUrl);

where logouttUrl = “…/logoff.jsp” in our world. Hope that helps… By moving this up one path from VAADIN, the request is not passed through the Vaadin application servlet (com.vaadin.terminal.gwt.server.ApplicationServlet) since we’ve also configured our web.xml with:

Open eSignForms Application /VAADIN/*

David

Hi David,
thanks a lot for your hints

hi i m also facing same problem i have implemented your code but i m getting error saying like -->Cannot make a static reference to the non-static method setLogoutURL(String) from the type Application
my code looks like

String logouttUrl = “…/logoff.jsp” ;
Button l = new Button(“Logout”);
l.setWidth(null);
l.addListener(new Button.ClickListener() {

		public void buttonClick(ClickEvent event) {
			// TODO Auto-generated method stub

//
Application.setLogoutURL(getURL() + logouttUrl);
}
});
I have created logoffjsp and changed the web.xml also .Please Replay