![]() The project.ini Settings |
![]() Active Web |
![]() |
With Concerto 3 it is impossible to serve the contents of the project.ini file held within a directory under script root. This is due to the Concerto Server not recognising the .ini extension as a valid script file type. If you did try to access it then Concerto generated an access denied message.
In the case of Active Web this is only the case if the /concertox/ Servlet mapping is used in the requesting path. Under other circumstances the web application container will serve the contents of the project.ini file.
This is clearly a potential security risk as the project.ini file is often used to store database connection strings and passwords.
For this reason the initial contents of the project.ini file are now held within the web.xml deployment descriptor.
In order to adequately secure the contents of the old style project.ini file it is now necessary to define the initial project contents in the web.xml deployment descriptor used to configure Active Web.
The settings for a project should now be configured as a parameter to the Active Web servlet. There should be one parameter for each project that requires configuration; the name of the parameter is dependant on the project directory name and is simply prefixed with project_. Hence a project of /stockcontrol/project.ini would have an Active Web servlet parameter name of project_stockcontrol.
The contents of the project will then become the value of the new project servlet parameter; with the exception that previously where each name/value pair were separated by a new line, in the parameter version they are separated by a semi-colon. Should you require to use a semi-colon in the value of a project variable then it should be escaped with an additional semi-colon character.
For example; the Concerto V3 project.ini file for stockcontrol:
Dbname=development
Dbusername=devtest
Dbpassword=devtestpwd
Would be replaced with:
<init-param>
<param-name>project_stockcontrol</param-name>
<param-value>
Dbname=development;
Dbusername=devtest;
Dbpassword=devtestpwd
</param-value>
</init-param>
When the Active Web servlet is initialized by the Web Application container, the project initialisation parameters are used to construct the project objects available to Active Web.
Calling reload programmatically from script will cause the initial values as defined in the project parameter to be reset into the project object. It will not remove any values or objects that have been subsequently added to the project object during normal operation.
Should you need to change the default values of a project object you will need to modify the deployment descriptor of your Active Web application. This is an Application Server specific feature and varies from one server to another.
For example in BEA WebLogic server, the WebLogic administration console allows the administrator to change the deployment descriptor using an online html form. With the Tomcat Web Application Server the administrator would typically have to modify the web.xml file manually using a text editor.
In either case once the change has been made; the Active Web servlet needs to be re-initialized to reflect the changes. This is also container dependant and you should refer to your containers documentation for the steps required. Typically it requires stopping and restarting the web application.
With the Active Web server static and dynamic content are separated in the installation directory hierarchy into the scriptRoot and webRoot directories. The Web Application concept brings these two sets of resources closer together into one easily distributable unit.
Active Web removes the need to separate your static and dynamic content. By using a path mapped Active Web servlet we can combine the contents of scriptRoot and webRoot into one hierarchy.
You should combine the two directory structures into one for deployment as a web application.
Topic ID: 150131