Remote deploy in Resin, Part 2
Last week, I wrote a post about how to use the new remote deploy functionality in Resin 4.0 using Ant and Maven. Now I’ll show you a click-by-click walkthrough of how to use the same facilities from the Eclipse plugin. Some of the navigation in Eclipse can be tricky if you haven’t used it before, so there’ll be screenshots all along the way. (Warning: there are lots of images below the fold…)
- Create a configuration file like that in the previous post and start Eclipse
- Create a new Dynamic Web Project

- Enter a project name, then click on “New…” in the “Target Runtime” box

- Click on the Resin 4.0 (hot deploy) target

- Fill in the deployment parameters. Choose a “local” server.

Note that you’ll need to have a local copy of Resin even if you’re using a remote server. The installation includes the code needed for remote deployment as a client. In this example, we’ll be running the server locally, so Eclipse will actually start up a new Resin instance. At the moment, Eclipse WebTools currently has a limitation that it won’t let you deploy as a remote client to the localhost without starting a new instance. If you’d like to deploy to a running instance, it must be on another machine. This is something I’m looking at fixing soon. - Fill in the parameters for the web project itself

- Within the project, create a new JSP

- Name the JSP “index” and click “Finish”

- Type some text in the JSP file

- Right-click to get a pop-up menu on the project. Select “Run As->Run on Server”

- Create a new server of the type “Resin 4.0 (hot deploy)” and click next

- Enter the parameters for the server and click next

- Make sure that your project is in the “Configured projects” column and click finish

You’ll need to wait 10 seconds (or more) for the application to start. There’s a delay in the script that builds the war file to deploy of 10s to allow time for the server to start. This is the default for most other application servers as well. Resin starts up quite quickly on most machines :-), so we may reduce that in the future. - The server should now run and display your page

