Installed Tomcat by following this link. Installed the latest Apache NetBeans from Ubuntu Software center, version 12.1. The installation of tomcat completes without any issues and I am able to access the Host manager and application manager. When I try to add TomCat server in NetBeans IDE the error "The specified Server Location (Catalina Home) folder is not valid ". I tried all the other solutions but nothing works for me. Anyone who has experience in setting this up on an ubuntu machine may be of help in this case.
If any further info is needed please mention them and I will provide it here.