Gotcha - Understanding Netbeans 6.1 and Tomcat 6.0 configuration
Posted on 26-June-2008.
This short tutorial explains how NetBean IDE 6.1 deals with deployments [of applications in Tomcat]
done using the IDE [right click the project in IDE and choosing an option like Run, Build etc] in Windows.
During installation of NetBeans 6.1 [that is bundled with GlassFish and Tomcat], I had installed Tomcat 6.x
in
E:\tomcat6 and NetBeans in
E:\Program Files\NetBeans 6.1.
My workspace is in
E:\javacode\netbeanscode. I created a web application and had to make
changes in the server.xml of Tomcat [like configuring a DataSource].
As I had installed Tomcat in E:\tomcat6, I modified the
server.xml under
E:\tomcat6\conf folder
and expected NetBeans 6.1 to pick up the changes. But the changes were not getting reflected.
I selected
Tools-->Servers and found the configuration
of
Catalina Base as in the screenshot below.
NetBeans copies the following folder structure [shown in the screenshot below] under user home directory [which is
C:\Documents and Settings\karthikeyanc\.netbeans\6.1\apache-tomcat-6.0.16_base].
We have to edit the server.xml under this folder to have any changes reflected in the configuration.
The work around is described as below. The above issue of Catalina Base being a non editable field happens only with the Tomcat installed
during NetBeans installation. Further Tomcat instances configured using
Add Server button
allow Catalina Base to be modified. Hence configure Tomcat 6.0 as in the screenshot below
to set your Catalina Base value to Catalina Home.
Hope this will get fixed in the next releases of NetBeans 6.1.
Kindly
Mail your comment.