Chapter 3. Portal urls

Julien Viet

3.1. Introduction

Most of the time portals use very complicated urls, however it is possible to setup entry points in the portal that follow simple patterns.

Each portal container can contain multiple portals and within a givin portal, windows are organized in pages, a page simply being a collection of windows associated to a name.

Before reading this chapter you must know how to define a page and a portal, you can refer to the chapter about XML descriptors to have a better understanding of those notions.

3.2. Acessing a portal

Each portal container can contains multiple portals, also there is one special portal which is the default portal, i.e the one used when no portal is specified in particular.

The following examples show you how the selection is done.

  • ""
    "/"
    "/index.html" with no parameters
    "/portal"
    "/portal/"
    => default / "/index.html"

  • "/portal/blah.html"
    => default / "/blah.html"

  • "/portal/another/"
    => another / "/index.html"

  • "/portal/another/blah.html"
    => another / "/blah.html"

  • "files"
    "/files/"
    => default / "/index.html"

  • "/files/blah.html"
    => default / "/blah.html"

  • any other URL, like "/blah.html" is served from the another servlet (war files or security for instance)

3.3. Accessing a page

It is possible to have multiple page per portal. As for portal there is a default page for a given portal. Once the portal has been selected, then a page must be used and all the windows present in that page will be rendered. The page selection mechanism is the following.

  • If there is a target window in the URL, the page where this window resides is chosen. Usually these URLs are rendered by portlets to target themselves.
  • If there is a "page" parameter then a page with that name is looked in the current portal, for intance th URL "/index.html?page=admin" will chose the admin page in the default portal.
  • the default page for the current portal is used, for instance the URL "/index.html" will use the default page in the default portal.