Gerry Mueller wrote:Hi Tim,
Thanks for the response.
I had holyday, but i currently back to my job.
I understand what you say, but no correctly. Please what do you mean with webapp's Context definition?
http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#A%20word%20on%20Contexts
Where must i define the Realm?
You can define a Realm globally in server.xml. You can define a Realm for a single webapp in its context definition.
where must i define the security constraints?
/WEB-INF/web.xml
I don't understand what you mean with Webapp's context. My Tomcat folder (webapps) doesn't have a webpp-name like showing in eclipse
C:\apache-tomcat-6.0.20\webapps
-- docs
-- examples
-- host-manager
-- ROOT
All
Java webapps are defined as WAR files. A WAR is a JAR set up according to the needs of
J2EE as documented in Sun's J2EE standards.
Tomcat supports "exploded WARs", which are WAR files that have been unzipped. It will not make an operational distinction between a true WAR file and an exploded WAR. Not all webapp servers support exploded WARs. They are not part of the J2EE standard.
TOMCAT_HOME/webapps is a directory where you can place WARS and they will automatically deploy, although they will operate under default environmental values. You must define a webapp context file (see hyperlink above) if you want to override those values. In the cases of Realms,
JDBC connection pools and alternative context names, you will have to define an explicit webapp context.
If there is no webapp context definition, the name of the WAR file (omitting the ".war" extension) or the name of the directory (for an exploded WAR) are used by Tomcat as the webapp's context name. An exploded WAR must all be contained within a single directory. In other words, you cannot place the WAR's files directly in TOMCAT_HOME/webapps. Likewise, if you provide a context definition that points to an alternative location, that location (codebase) has to be the pathname of a directory (for exploded WAR) or of a WAR file.
The context name is used to synthesize the model URL. If the context name is "myapp", a default Tomcat URL for myapp and its resources would be "http://localhost:8080/myapp".
Tomcat also comes with a default root context "/", which brings up the Tomcat admin pages. Unless you really know what you're doing, it's best to leave this alone.