Setting up Apache Tomcat 7.0 to work with NetBeans IDE 7.0.1

Go to to download the latest Tomcat server zip file. Install it in your computer C:\ drive.
Open your software NetBeans IDE, click on Tools menu, select Servers. You can remove GlassFish which is the default server and add the Tomcat. If you already used the port 8080 for PHP localhost, you should use port 8081 for Tomcat and Shutdown port is 8006.

Important step: You must define user role as “manager-script” in Tomcat70\conf\tomcat-users.xml in order to run in NetBeans. Add these 2 lines inside <tomcat-users> block.

<role rolename=”tomcat”/>
<user username=”tomcat” password=”tomcat” roles=”manager-script” />

You’re done! Now you can run or debug jsp pages in NetBeans. Hope this helps some of you who are Java beginners.