![]() |
< Day Day Up > |
![]() |
Recipe 11.10 Using a Tomcat Plug-in11.10.1 ProblemYou want to automate some of the Tomcat processes, such as starting and stopping Tomcat, as well as debugging Tomcat projects. 11.10.2 SolutionUse a Tomcat plug-in such as the Sysdeo plug-in. Download the plug-in from http://www.sysdeo.com/eclipse/tomcatPlugin.html, and expand it in the Tomcat plugins directory. It'll add buttons to the Eclipse toolbar for starting and stopping Tomcat. 11.10.3 DiscussionThe Sysdeo plug-in enables you to start and stop Tomcat from inside
Eclipse, and you can download it for free from http://www.sysdeo.com/eclipse/tomcatPlugin.html.
You install this plug-in by expanding it in the Tomcat
plugins directory, then
activate it by selecting Window Figure 11-10. Configuring the Tomcat plug-in![]()
As shown in Figure 11-11, this adds a new Tomcat menu to Eclipse and adds three Tomcat buttons to the Eclipse toolbar you can see under the Navigate menu; these buttons start, stop, and restart Tomcat. Figure 11-11. Tomcat menu and buttons in the toolbar![]() You also need to connect the plug-in to your installation of Tomcat.
Do that by selecting Window Figure 11-12. Configuring the Sysdeo Tomcat plug-in![]() This plug-in can handle the details of storing your files in the
Tomcat installation if you create a Tomcat project. Just select
File Figure 11-13. Creating a Tomcat project![]() As shown in Figure 11-14, your project files will be created in the correct Tomcat directories, which will appear in the Package Explorer. Figure 11-14. A new Tomcat project![]() The Sysdeo Tomcat plug-in also enables you to debug Tomcat projects as they're running, using the Eclipse debugger. That's extremely useful for web development because otherwise, all you have to track down errors with are the oblique Error 500 Server Error messages Tomcat shows in your browser. 11.10.4 See AlsoChapter 9 in Eclipse (O'Reilly). |
![]() |
< Day Day Up > |
![]() |