how to provide different views for different URLs?

Hi,

What’s the best way to create different application windows based on the accessed URL, for the same app?

eg. I want to serve the app with 2 different looks:

  • When accessed via /app/public it shows the public facing view.
  • When accessed via /app/admin it shows the admin view (after authentication etc)

Currently, I have 2 configured in web.xml for the above 2 URLs, and then inside Application.init() I use getURL() to figure out the URL accessed, which is then used to decide what Window to create.

Is there a better way to do this?

The above method requires that I change web.xml each time I want a new mapping, compared to just mapping /app/*.

thanks a lot.