ExternalLink logoutLink = new ExternalLink("logout_link", "/j_spring_security_logout");
logoutLink.setContextRelative(true);
add(logoutLink);
I was integrating Spring Security and wanted to add the logout link. There is no need to figure out the context path, as the ExternalLink class has an option to set the link as relative to the context.
You can find more info here: ExternalLink (javadoc)
0 comments:
Post a Comment