/>. By default, that's on Unix and on Windows. This is especially important if you want to use a different workspace for development than deployment. Just call the executable with the -conf flag. unix> httpd.sh start -conf devel.conf -verbose d:\> httpd.exe -conf devel.conf -verbose The following will a servlet to handle all unmatched URLs, just like the FileServlet does by default. <servlet-mapping url-pattern='/' servlet-name='MyServlet'/> This has a different effect from . will have priority over extension mappings like , while has the lowest priority. In the resin.conf, add an directive using for the exception type. The location must be an absolute path understandable to your web server. For example, since the web server will display this message, you can't forward to a jsp file. <error-page exception-type='connection' location='/errorpage.html'/> Use the /> directive. For example, to grab images from /home/images/*, use: <path-mapping url-pattern='/images/*' real-path='/home/images'/> The vast majority of sites can completely ignore web-apps. If you're starting with Resin, use the default web-app and don't worry about it. You'll only want to use web-apps when you want separate projects using the same web server. For example, on an ISP site, each user might get her own web-app. She can treat the web-app as if she had control over the whole web server starting at a URL prefix like . A web-app is a generalization of a virtual host. With virtual hosts, each host pretends that it controls its own server when it really is sharing the server with other virtual hosts. A web-app extends this by creating virtual applications for a URL prefix. Each web-app gets its own sessions, servlets, beans and static pages. Remember, the browser doesn't know about your web-apps. It treats the web server as a single URL-space. This may cause you troubles if you use a standard directory structure like putting images in '/images/*'. To see this problem, suppose you have a web-app called '/myproject'. Suppose you have a JSP page in the web-app called . The full URL will be . Your image reference should look like one of the following: <img src='../images/image1.gif'/> <img src='<%= application.getContextPath() %>/images/image1.gif'/> Using will fail because the browser will look for when you really want . Jan Venema replies, This is my working config under IIS 4.0 end Resin1.1b6 <caucho.com> <http-server> <error-log id='log/default-error.log'/> <!-- -- Each virtual host has its own applications, sessions, -- and servlets. You must duplicate the configuration for -- each host. Each host ignores the configuration in -- the outer block. --> <host id='192.168.0.2'> <app-dir>d:\inetpub\wwwroot\inverko</app-dir> <error-log id='d:\inetpub\wwwroot\inverko\error.log'/> <servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/> <servlet-mapping url-pattern='*.jsp' servlet-name='com.caucho.jsp.JspServlet'/> </host> <host id='192.168.0.3'> <app-dir>d:\inetpub\wwwroot\dmd</app-dir> <error-log id='d:\inetpub\wwwroot\dmd\error.log'/> <servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/> <servlet-mapping url-pattern='*.jsp' servlet-name='com.caucho.jsp.JspServlet'/> </host> </http-server> </caucho.com> The basic command is error-page. There are three kinds of error pages Error code pages, e.g. 404 Exception, e.g. java.lang.NullPointerException connection failures, "can't connect to srun" The document root is set in resin.conf using the app-dir: <http-server app-dir='/www/htdocs'> ... </http-server> Each virtual host and each web-app will have its own app-dir. The app-dir configuration must be in resin.conf, not the web.xml (otherwise Resin couldn't find web.xml): <web-app id='myapp' app-dir='/www/myapp'> ... </web-app> If you don't specify an app-dir, Resin will use looking in /www/htdocs/myapp in the above example. Optionally, you can put a web.xml in [app-dir]/WEB-INF/web.xml (again, following JSDK 2.2). The web.xml can contain anything the in resin.conf can. Auto-reloaded classes belong in [app-dir]/WEB-INF by default, following JSDK 2.2: classes -- auto-load/recompile Java servlet/bean/classes directory lib -- auto-loaded *.jar files In the web-app, you can add to the auto-reload classpath using: <classpath id='myclasses' source='/home/work/proj/src' compile='true'/> The JSP/Java work directory is /tmp/caucho (or \temp\caucho). You can change that with: <java compiler='javac' work-dir='/path/to/my/work/dir'/> Finally, the startup scripts will look for jars in resin1.1/lib to add to the classpath before starting resin. Setting href='../ref/app-config.xtp#directory-servlet'>directory-servlet to "none" will disable directory browsing. <web-app id='/'> <directory-servlet id='false'/> </web-app> As described in the virtual host reference, you must use <host> and <app-dir> in your resin.conf to configure virtual hosts. If you omit the <host>, Resin will generate the same class name for both hosts. So one host will see the JSP from the second host. By adding the <host>, Resin will make the class names unique. There's no that will only match '/'. url-pattern='/' will set the servlet as the default servlet, replacing the file servlet. You'll need to use Resin's . will do the trick.