WHAT

An application usually needs parameters. There's lots of solutions, to pass a key:value list. But, have you ever tried to make real world user (not sysadmin) to edit file.properties, or change their environment variables ? For common users, the best is to have a simple webform. The problem is, do we want to code an heavy security policy, with profiles and so on ? And for the user, it's one more password to remember, an interface to understand...

The idea is, don't add one security layer more. For your app, you are quite sure that the server admin have rights to start your app. But, your app will not run till some parameters are provided, first page will be a form to fill in. After the first start, these parameters could also be written somewhere, so that it will run for further restart of the server.

WHO

 \[FG\] [FredericGlorieux] http://ajlsm.com

STATUS

First draft of a text explaining a logic already implemented in an app. Will be used as javadoc, and dev guide.

HOW

The idea is to have an universal matcher before all your pipes. In it, there's an action checking if parameters are valid.

You can implement a more complex way to display the form, for example aggregating your own "status generator" of your app (very useful for debug), providing somme error messages.

      <map:match pattern="**">
        <map:act type="ParamsOnStart">
          <map:generate src="adminForm.xhtml"/>
          <map:serialize/>
        </map:act>
      </map:match>
      <map:mount check-reload="yes" src="app.xmap" uri-prefix=""/>

WHY

Where to get parameters ?

How to use them

CHANGES

 <<Date(2004-10-17T09:09:38Z)>>:\[FG\] Creation

REFERENCES

More links to come.

SEE ALSO

Generated links

cited by

about xfolio

<<FullSearch>>

<<PageList(xfolio)>>