View Source

{section}\\

{column}

h1. Jars requirements:\\

This is the place to find documentation about the Petals Web Console requirements.
\\

Because Petals Webconsole use a number of classes and interfaces that describe
\\

and define the contracts between a servlet class (of *2.5 Servlet Specification API*), you
\\

need to use  runtime environment which provided it.
\\

So, if you want to run the Petals Webconsole, you need to have a servlet container which
\\

+support+ 2.5 Java ServletSpecification API, for example _Tomcat 6, Jetty 7, JBoss 5.1 GA_.
\\

You can verify if you Java web server provide the 2.5 Servlet Specification API, by
\\

checking in the server librairies the "_servlet-api.jar_" and verify if the Manifest file
\\

correctly contains "_Specification-Version: 2.5_".

h1. Realm & JAAS Configuration:



In +webapp/META-INF+ the context.xml file allows you to specify the *Realm which will be applied*



to you Webapp (represented as a Context within virtual host of your Java web server).



By default two Realm are preconfigured in this file, we advise you to keep one of these previous



configuration.

{code:lang=xml} <Context docBase="petals-webconsole-ui" path="/petals-webconsole-ui" reloadable="false" source="org.eclipse.jst.j2ee.server:petals-webconsole-ui">

<Realm className="org.apache.catalina.realm.JAASRealm" appName="WebconsoleJAAS" userClassNames="org.ow2.petals.tools.webconsole.services.security.auth.EntityPrincipal" roleClassNames="org.ow2.petals.tools.webconsole.services.security.auth.EntityRolePrincipal"/>

</Context>{code}

The previous configuration allows to use JAAS Realm Webconsole configuration, the Webconsole users are managed in the security.xml file.



You need to run you Java web server with this following property: *Djava.security.auth.login.config="/media/data/Java/jaas.config"*



_jaas.config_ file must be present at the where is indicated, it must contain the following code:

{code}WebconsoleJAAS {

org.ow2.petals.tools.webconsole.services.security.auth.EntityJAASLoginModule required debug="true";

};

{code}

That allows to specify the JAASLoginModule used.



The second configuration is:

{code:lang=xml}<Context docBase="petals-webconsole-ui" path="/petals-webconsole-ui" reloadable="false" source="org.eclipse.jst.j2ee.server:petals-webconsole-ui" debug="0">

<Realm className="org.apache.catalina.realm.UserDatabaseRealm" digest="SHA-1" resourceName="UserDatabase"/>

</Context>{code}

It specify UserDatabaseRealm as the Realm which will be used by the context. This Realm load information about all users from Java web server and their corresponding roles, for example these informations will be recovered by the



_$CATALINA_BASE/conf/tomcat-users.xml_ with Tomcat as Java web server.

{note}Take attention with the used digest algorithm (here *SHA-1*)

{note}



h1. Context parameters:



If you deploy the Webconsole with apache Tomcat, take attention to don't set to "true"



the "*reloadable*" context parameter in the _server.xml_ file of your web server.

{code:language=xml|title=server configuration file} <Context docBase="petals-webconsole-ui" path="/petals-webconsole-ui" reloadable="false" source="org.eclipse.jst.j2ee.server:petals-webconsole-ui" debug="0">

<Realm className="org.apache.catalina.realm.UserDatabaseRealm" digest="SHA-1" resourceName="UserDatabase"/>

</Context>{code}

As is signified in the Tomcat documentation for "reloadable" parameter :





"Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, {color:#ff0000}but it requires significant runtime overhead and is not recommended for use on deployed production applications{color}. You can use the [Manager|http://tomcat.apache.org/tomcat-4.1-doc/manager-howto.html] web application, however, to trigger reloads of deployed applications on demand."



[http://tomcat.apache.org/tomcat-6.0-doc/config/context.html]













If you deploy the Petals Webconsole with "reloadable" to "true", the container reload the application context whenever you add, delete, modify ... one server or one user.



You'll be really annoying, because it will require you to login again.