How to hide text that appears after my domain in a URL?

Asked

Viewed 1,023 times

1

I have a Java application using Spring MVC.

Suppose my application has the domain www.meusistema.com.br

As the user navigates, other urls are generated, example:

  • www.meusistema.com.br/acessarConta
  • www.meusistema.com.br/cadastros/recuperarSenha
  • www.meusistema.com.br/register? type=1

I wonder if there is any way to hide what appears after the bar (/), and therefore my user always browse just seeing www.meusistema.com.br

Is there any way to hide the rest of the url? The application uses Spring MVC but the solution for this does not necessarily need to use this framework... My screens are in JSP, so I can use javascript, ajax, jquery etc.

  • 2

    It is not advisable to do this. An example of this is if the user wants to pass the URL to a friend, what is ? Or want to save, do not have Javascript active in the Browser (which is not impossible)? Besides that Google will not list the other pages of your site, what believe, generates a big loss.

  • The idea is just this, the user does not pass and have access to the urls. By spring, I already put user profiles so that he does not have access to pages that his profile does not allow. But I have some cases where there is no profile restriction, but we don’t want the user to have the url...

2 answers

0

You can also map the controller to "/" and use the Viewresolver to handle each view.

In this case the controller would have to redirect the request to each appropriate view, returning different view names.

0


I solved the problem by changing all html Forms to POST, then setting in the Controller what appears in the URL.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.