java - how to get referrer from ContainerRequestContext object -


how referrer url containerrequestcontext object.

please find code snippet below,

public void filter(containerrequestcontext requestcontext) {    applicationuser user = (applicationuser) cachemanagerbase.getinstance().getapplicationusercache().getcurrentuser();    requestcontext.setsecuritycontext(new usercontext(user)); } 

there's couple of different options, simplest is

string referrer = requestcontext.getheaderstring("referer"); 

that might return null if header isn't set.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -