|
. 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 httpd executable with the -conf flag.
The following will a servlet to handle all unmatched URLs, just like the FileServlet does by default.
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.
Use the directive. For example, to grab images from /home/images/*, use:
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:
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
The basic command is error-page. There are three kinds of error pages
The document root is set in resin.conf using the app-dir:
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):
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:
In the web-app, you can add to the auto-reload classpath using:
The JSP/Java work directory is /tmp/caucho (or \temp\caucho). You can change that with:
Finally, the startup scripts will look for jars in resin1.1/lib to add to the classpath before starting resin.
Setting directory-servlet to "none" will disable directory browsing.
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.
|