Standards for Naming Web Resources

Documentation home

 

This document is a recommendation for naming web resources that are referred to within an Ebase application, such as: static HTML pages, images, JSPs etc. The intention is to introduce a system where entire applications can be easily migrated from one system to another.

 

  1. For each new business project created in Ebase, set up a directory with the same name in the document root of the web application. Within this directory create sub-directories images and jsps. Additional sub-directories can be added as required. Any static HTML pages should be placed in the project directory.
  2. In addition, the document root should contain a directory named shared with the same structure, that contains any web resources that are shared between Ebase projects.
  3. When referring to web resources either within Ebase (e.g. presentation template or as nested HTML tags within texts) or from JSPs or static pages, always use the address relative to the document root, not the full address.  Example (Ebase web application document root is <docroot>)
  4. Set up a new Ebase project PROJ1.

 

The file system will look like this:

 

+ <docroot>

      + shared

      ...... static HTML pages shared across projects

            + images

            .....images shared across all projects

            + jsps

            .....JSPs shared across all projects

 

      + PROJ1

      ...... static HTML pages for PROJ1

            + images

            .....images for PROJ1

            + jsps

            .....JSPs for PROJ1

 

A reference to image1.gif in PROJ1 is therefore PROJ1/images/image1.gif

A reference to shared JSP logo.jsp becomes shared/jsps/logo.jsp

Note that a leading forwardslash (/) should not be used.