A
A
Alexander2016-10-06 18:21:28
Java
Alexander, 2016-10-06 18:21:28

How to secure access to jsp consisting of several files?

And so there is a certain index.jsp file that they get to after authorization. There is a check for the presence of a session (if there is none, then the presence of cookies) and in the absence of a redirect to login.jsp
But for better readability, it would be more correct to split the index.jsp file into several parts (considering that some parts will be repeated all the more): header. jsp, body.jsp, footer.jsp
But what about the validation then? If you put it only in header.jsp, then you can directly connect to body.jsp and footer.jsp. And pushing a check into each file is not sure if this is a good form.

PS if there is any best practices for creating a site - I will be grateful.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sirs, 2016-10-06
@ZzeroCool

Put all pages, except for index.jsp, in web-inf, they will not be directly accessible. And the index.jsp page is assembled from separate parts on the server side (include tags and all that) and appears to the client as a single piece of html.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question