Question: how to block a jsp page 
(i want is ,when I click the links to redirect each pages I want to block some specific pages for specific users) 
I create an java script function to retrieve the jsp pages of each users(pages that user can access).But I have no idea to block other pages for the same user)

Answer: 
use js `document.getElementById("id name of link").style.display = 'none';` to remove the link from page and use **'block'** instead of **'none'** for showing the link.
Pure jsp solution:

assuming you have an array of available links: `List<String> links`, which you pass under the same name to request(or you may retrieve it from user, doesn't matter, assume you have array of those links despite way of getting it), then you can do something like:

```
    ...
    <c:forEach var="link" items="${links}">
    <a href="${link}" <c:if test="/*here you test if user have 
access, i dont know how you do it*/"> class="inactiveLink" </c:if>>page link</a>
    </c:forEach>
    ...

```

Where `...` is rest of your jsp, and define style 

```
.inactiveLink {
   pointer-events: none;
   cursor: default;
}

```

Note that in order to use foreach - you should define jstl taglib at the top of your jsp:

```
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

```

*In case you don't [know what is jstl](https://www.tutorialspoint.com/jsp/jsp_standard_tag_library.htm), and what is [EL](http://docs.oracle.com/javaee/6/tutorial/doc/gjddd.html) generally*

A good notion was said about disabling css and js, if you want them to be completely inaccessible, you can just print only allowed links:

```
...
<c:forEach var="link" items="${links}">
<c:if test="/*here you test if user have 
    access, i dont know how you do it*/"> 
        <a href="${link}">page link</a>
</c:if>
</c:forEach>
...

```