Menu

Page Appearing Incorrectly on Internet Explorer

If you are experiencing your web page is broken and UI is not working as designed in Internet Explorer and maybe or may not be working fine with other browsers. This issue is because of web browser compatibility that we might set manually and forget. Please perform the following steps to get the fix and overcome this situation.

Step 1: Goto Tools >> Compatibilities View Settings, a new window will popup.

Step 2: Check if your domain is listed under Websites you've added to compatibility view. Remove the site from this list and reload the page. Below are the screenshots for reference.
Internet explorer compatibility issue
Internet Explorer compatibility issue

Now restart the browser and browse the page.

If this solution doesn't work then try the below steps to delete the registry settings from your machine.
We may need to delete the REG_DWORD value for iexplore.exe under the registry editor to modify and change the default document mode to Edge or IE11. They might need the help of a technical or local IT person.

Open the registry editor using regedit.exe and follow the below-mentioned paths to find the configuration in the registry.

For 32 bit windows machine: HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Internet Explorer > Main > FeatureControl > FEATURE_BROWSER_EMULATION

For 64 bit windows machine: HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Internet Explorer > Main > FeatureControl > FEATURE_BROWSER_EMULATION and HKEY_LOCAL_MACHINE > SOFTWARE > WOW6432Node > Microsoft > Internet Explorer > Main > FeatureControl > FEATURE_BROWSER_EMULATION

Delete the REG_DWORD value iexplore.exe. Now close the browser and relaunch the website using Internet Explorer 11, it will default to Edge as Document Mode.

Reference: 

Get requested page URL from request in Spring Boot

How to get the requested URL information in a Spring security project so that we can redirect the user to the secure or right page after successful login. On every request Spring security stores the following information in the session key "SPRING_SECURITY_SAVED_REQUEST". This way will help us to get the last requested URL or request from where a user started the authentication request that redirected the user to the login page.

SPRING_SECURITY_SAVED_REQUEST key spring boot-request-url
SPRING_SECURITY_SAVED_REQUEST

Below is the code snippet to get the requested url from the "SPRING_SECURITY_SAVED_REQUEST" key.

DefaultSavedRequest savedRequest = (DefaultSavedRequest)request.getSession()
        .getAttribute("SPRING_SECURITY_SAVED_REQUEST");
    	if(savedRequest != null) {
    		String previousPageUrl = savedRequest.getRedirectUrl();
    		
    	} 

This will helps us to redirect the users to the secure page after successful login. Thank you, hope this solves your problem.

How to get the last path segment of an URL using Java

With any programming language, we come at some point where we need the last segment of the URL to manage and moderate the request and response. Hence with this sample Java program, we will see how we can get the last segment of the URL or URI after a slash (/).

public class JavaSubStringSample {

	public static void main(String[] args) {
		String path = "http://localhost/customize";
		String finalName = path.substring(path. lastIndexOf('/'));
		System.out.println(finalName);
	}
}


The above program will return the last segment of a given URL from the path variable. i.e. /customize. You may also remove the special charecter slash by adding +1 after lastIndexOf method in substring method.


Java LastIndexOf() - rashid jorvee
Screenshot of result