java - Session management in Servlets and JSP -


how use sessions throughout servlets , jsps in project?

when go 1 of jsp pages, exists in project, writing directly jsp file name in url, localhost:8080/xyz/abc.jsp, without validating login, jsp page opening in browser.

how manage jsp pages , servlets there no access page without login authentication?

i suggest way build filter. can used run code before , after request handled servlet or jsp. can build filter checks user's session valid and, if not, redirects user login page or "unauthorised" page. save adding authentication logic every jsp file want protect.

maybe this blog post helpful.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -