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.
You could use the `event.preventDefault();` and have a variable saying if the user should or not be blocked. Check the following example:

```js
var BlockUser = true;
function CheckUser() {
  if ( BlockUser ) {
    event.preventDefault();
  }
}
```

```html
<a href="http://stackoverflow.com/">Link for any user</a>
<br>
<a href="http://stackoverflow.com/" onclick="CheckUser()">Link for certain users</a>
```