<<TableOfContents: execution failed [Argument "maxdepth" must be an integer value, not "[3]"] (see also the log)>>

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

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

REFERENCES

More links to come.

SEE ALSO

Generated links

cited by

about xfolio


Display context of search results
Case-sensitive searching

XfolioParamsOnStart (last edited 2009-09-20 23:42:11 by localhost)