How to determine which HTML file should be displayed as input in Jersey?

5

I'm trying to find a way to provide a correct entry page in Jersey. A login page when there is no user logged in, otherwise I should display another home page that will call RESTful services developed with Jersey and that will change the home page interface when a user is logged in.

Below the configuration of the file web.xml :

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>login.html</welcome-file>
</welcome-file-list>

Any solution is valid as long as you use the web.xml setting to make it easier. I do not find it convenient to have to create a service to return each of these pages.

    
asked by anonymous 14.02.2014 / 20:14

1 answer

2

If the idea is to direct users not logged in to a particular page, you can create a filter (#

  • Filter ) to check if the user's status is redirected to the correct URL if not logged in.     
  • 14.02.2014 / 20:30