URL as parameter

Sitemaps highly depends on URL-as-parameter Elephant feature. Used mainly on BrightSide modules, the functionality is provided by the Elephant's core.

Current URL resolving state

In order to work correctly, you need to provide information to the file entity-web-context.properties, under /WEB-INF/elephant/conf. Elephant uses this information to ensure which entity is at stake. In short, entities not defined in this file wont get an URL.

As for now, the URLs are generated once, and would never change. This is in itself an issue, since users wont be able changing wrong generated URLs. On the other hand, URLs encountering problems at generation time (violating the primary key, for instance) could be easily corrected.

What happens in the background

URL-as-parameter uses the Elephant's context recede behavior. When extra path is provided, but there is no context supporting it, the context implementation moves up. Formerly, this step changed the servlet path as well. Now, simply uses this mechanism to pass the extra path to EntityWebUrls.exists().

Since entity-web-context.properties is involved, checking the full path to ensure the result is quite easy.

Printer version
English01/31/18 20:27Lluís Turró Cutiller