codeofnode
codeofnode

Reputation: 18619

How to implement java security like redirecting if user is not logged in..?

In ASP.net we have a feature that if we put some web pages inside a folder, and put some configuration that user is not allowed to enter the folder if he is not logged in. If he tries to do so anyway, he will be redirected to the login page.

What is its alternative in Java EE?

I am very new to Java EE so any help in this regard will be a good help for me. Suggest some ways to protect jsp pages.

Upvotes: 1

Views: 565

Answers (1)

JB Nizet
JB Nizet

Reputation: 691735

The same option exists in a Java EE webapp, by declaring a login config and a security constraint in the web.xml file. Read the tutorial for more details.

Upvotes: 1

Related Questions