Tomcat In Eclipse – Sysdeo Tomcat Plug-in

There are many plug-ins available for the integration of tomcat with eclipse but most simple among them is “ Sysdeo Tomcat plugin ”. This can be downloaded from http://www.eclipsetotale.com/tomcatPlugin.html .

Step wise process to integrate tomcat using this plug-in is as follows:

  1. Tomcat should be pre-installed on the system. For further details click here.
  2. First step towards this process is, Download and unzip this plug-in in your eclipse plug-in directory.
  3. When you restart Eclipse IDE, Tomcat options(start, stop, restart) will start appearing on the Pane and in Menu.
  4. This plugin launches Tomcat using the default JRE selected in Eclipse “ Preferences ” window. To set a JDK as default JRE for Eclipse open the preference window: “ Window ” – > “ Preferences ” – > “ Java ” – > “ Installed JREs ”. The selected JRE must be a JDK (Tomcat require JDK to compile files instead of JRE).
  5. Next step involve setting of tomcat path at “ Window ” – > “ Preferences ” – > “ Tomcat”.
  6. Now it is ready to be used. To test our integration we can make a Servlet or JSP. Select “ File ” – > “ New ” – > “ Project ” and select the new entry Tomcat Project under Java, then press “ Next ”.
  7. Give project a name.
  8. Select the context and finish it. Now create a new file in this project, By selecting “ File ” – > “ New ” – > “ File ” option and give it the name “ Test.jsp”.
  9. Write this simple code in file and save it.
  10.  
    <%@ page language = "java" %>
    <%@ page contentType = "TEXT/HTML" %>
     
    <center>
    <h2> If this page is being seen in a web browser,
    it means integration of Tomcat and Eclipse is complete.</h2>
    </center>
  11. Now start tomcat from menu “ Tomcat” – >“ Start ”. Its logo will start appearing in Eclipse console.
  12. Open a web browser and go to the URL. A page will load and you will get the figure like this.