|
Application classes belong in . Jars belong in .Look at the standard installation and check the HelloWorld example. The HelloWorld source is in . Resin will automatically compile that source when running the demo and put the class in the same directory.If you change the app-dir to /usr/local/apache/htdocs, servlets and beans will belong in /usr/local/apache/htdocs/WEB-INF/classes. Until you get your first servlets working, don't try to create your own web-apps. When you do start working with web-apps, look at the guest book examples to see where beans and servlets belong. You can also change the default location with the directive.Application jars belong in and standard libraries, like JDBC drivers, belong in the global classpath. In general, you should put standard libraries in the global classpath. Resin has several equivalent methods to add a jar to the classpath:
Only the last two will be automatically reloaded when the class or jar changes. For the first two, you'll need to restart Resin. You can see Resin's global classpath by starting it with the -verbose option:
You must restart Resin to pick up the new classpath. When using the Win32 Resin, you must quit the Resin application. Just pressing the stop and start buttons will not suffice.
The <work-dir>' '</work-dir> attribute configures the directory where generated *.java (for JSP) and *.class files go. If unassigned, they go into on Unix and on Windows.
Resin has a delay for testing updated servlets and JSP pages. The configuration variable for both is 'class-update-interval' in resin.conf. It's an application-level variable. The default is 15 seconds. So Resin will only check every 15 seconds for an updated page. You can set this value to 0 for development work.
If you want Resin to check servlets for updates every hour, your resin.conf might look like:
The JRE does not contain a Java compiler. You either need to get the JDK or use another compiler. To configure another compiler use:
First check that the class is in the right location. In the standard configuration, Java classes belong in . If you're using Resin's autocompilation, the Java source file must be in the same location.If you're using the automatic compilation, check that the in the *.java file matches its location.
cyou can get the application classloader from a servlet using the standard call .
Other symptoms are that sessions are killed on each request. This may occur if your *.java files have a date in the future. When the *.class is compiled, it will have an date before the *.java. So Resin will think it's old and recompile on the next request. This may occur, for example, if you work on NT and use Linux as a fileserver and the two clocks aren't properly synchronized. The only solution is to synchronize the clocks for both machines.
In Resin 2.1 the order is:
|