Selenium is probably the most popular tool for Java UI testing, which allows you to test your JSP pages without launching them in a browser.
You can test your web application UI using JUnit and Selenium. It even allows you to write web application acceptance tests.
I am still new to Selenium and learning it on Selenium WebDriver with Java - Basics to the Advanced course on Udemy.
If you decide to learn Selenium for unit testing your code then you can join its tool, it is probably the best resource to start with.
You will learn complete knowledge of Selenium Webdriver with strong Core Java basics, particularly important for testers who want to learn Java for automation testing along with Selenium.