Resin 4 and Eclipse

From Resin 4.0 Wiki

Revision as of 17:00, 26 April 2012 by Rick (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


This needs to be updated.

[The original with screen shots is here]

Contents

Eclipse

Integrating with Eclipse

General Principles

Starting Resin

Two styles find favor with developers. Remote debugging is used to debug a standalone instance of Resin. Starting Resin from within the IDE gives control of the startup and shutdown of the Resin server to the IDE.

Remote Debugging

Resin is started in a console window, with a remote debugging port enabled. The IDE is configured to attach to the remote debugging port. Resin's builtin facilities for detecting changes to web applications (.class and .java files, .jsp files, etc) enable the Resin server to stay synchronized with changes made in the IDE.

win> httpd.exe -Xdebug -Xrunjdwp:transport=dt_socket,address=9080,server=y,suspend=n ...
unix> bin/httpd.sh -Xdebug -Xrunjdwp:transport=dt_socket,address=9080,server=y,suspend=n ...

The conf file described in development.conf is well suited for development of one web application.

win> httpd.exe -server-root /path/to/webapp -Xdebug 
                         -Xrunjdwp:transport=dt_socket,address=9080,server=y,suspend=n 
                         -J-ea  -conf conf/development.conf

unix> bin/httpd.sh -server-root /path/to/webapp -Xdebug

                              -Xrunjdwp:transport=dt_socket,address=9080,server=y,suspend=n 
                              -J-ea -conf conf/development.conf

Starting Resin from within the IDE

Resin is started and stopped by the IDE. Console messages appear in the console window of the IDE.

IDE configuration value description
Classpath all of the jars in resin.home/lib, see Global Library|
Java argument -Djava.system.class.loader=com.caucho.loader.SystemClassLoader
Main class com.caucho.server.resin.Resin
Program argument -conf conf/development.conf See development.conf
Program argument -server-root /path/to/webapp The location of the web-app

Additional configuration

Some systems require additional configuration, indicated by Resin error messages.

IDE configuration value description
Classpath java.home/lib/tools.jar Needed for compiling java files
Java argument -Dresin.home=/usr/local/resin Needed if Resin cannot discover the value programmatically

Development resin.conf

development.conf describes a typical configuration file used for development purposes.

See also

Personal tools
TOOLBOX
LANGUAGES