Because the flexibility of Resin's configuration can be overwhelming, we've collected the most important configuration here. Once you understand the basic configuration, you can use it as a framework to attach more detailed configuration as you need it.
You may want to look at:
Configuring Resin involves configuring the following:
Resin organizes classes and JNDI resources into a tree. Each node in the tree inherits classes and JNDI resources from its parents and adds it's own classes and resources. So a databaseconfigured for the virtual host would be available for every web-app in the host.
The following creates a basic working configuration for a Resin standalone configuration. Resin will compile and load servlets and classes placed inand jars placed in in .
The urlwill invoke a servlet in .
The urlwill run a JSP in .
Servlet configuration normally belongs in the web.xml in the WEB-INF directory. Resin-specific configuration, e.g. database configuration, belongs in a resin-web.xml file in WEB-INF or in the resin.conf.
Because Resin merges the contents of resin-web.xml, web.xml, and resin.conf, so you can put everything in the resin.conf if that makes your application easier to maintain.
The following web.xml configures the special "invoker" servlet, which lets you call servlets using the classname in the URL like /servlet/qa.MyServlet. In general, it's a better idea to create specific servlet-mappings for each servlet for better security.
caucho.com is just a container for any Caucho configuration
http-server contains all configuration for the Resin server.
The most important configuration variable is. configures the document root. can appear in , , and . If it's not specified, it defaults to the parent.
Configures the HTTP port for Resin to listen at.
Configures a servlet runner port for Resin to listen at.
Each http-server contains some virtual hosts. Most configurations will use the default host.
Each host contains some web applications. A web application is just a container for some servlets. It's closely related to the javax.servlet.ServletContext. Most configurations will use the default web-app.
Maps url patterns to servlets. servlet-mapping has two children,and servlet-name. selects the urls which should execute the servlet.
The special servlet-name invoker is used to dispatch servlets by class name. For example, /servlets/test.HelloServlet.
In the following example, the URLinvokes the servlet
Defines a servlet alias for later mapping. More details are in the servlet configuration section.
In the following example, the urlinvokes the servlet . The servlet will use getInitParameter("title") to get the string "Hello, World".
The following description condenses the full configuration summary.