views:

325

answers:

1

I'm learning JSPs and servlets and I wanna use Netbeans. I've been unable to set Tomcat as the server instance.

Netbeans says: The /conf/server.xml can't be read

I'm running Ubuntu 9.04, what should be done?

alt text

EDIT: I've found that my CATALINA_HOME VARIABLE is set to /usr/share/tomcat6, so what the hell is happening?

Apparently, the system cannot reach a needed logs folder, is this a development bug in Netbeans or what?

touch: cannot touch `/usr/share/tomcat6/logs/catalina.out': No such file or directory ./catalina.sh: 357: cannot create /usr/share/tomcat6/logs/catalina.out: Directory nonexistent

http://yfrog.com/1fscreenshot2vfp

+1  A: 

What's most likely happening is that you (or more specifically, the process running NetBeans) does not have permission to write to your Tomcat install directory (/usr/share/tomcat6).

The best solution, IMO, is to create a CATALINA_BASE in your home directory (or a directory you have write access to), and then configure NetBeans to use it. As you can see in your screenshot, NetBeans refers to this as the "Private Configuration Folder."

The directory structure under CATALINA_BASE should look like this:

<directory of your choice>
|-- conf
|   |-- server.xml
|   `-- web.xml
|-- logs
|-- temp
|-- webapps
`-- work

You should be able to copy server.xml and web.xml from /usr/share/tomcat6/conf.

Jack Leow
Yes! Worked perfectly, thanks.
omgzor