Tomcat, Netbeans Mac OSX Lion

17,832

Solution 1

Add a new Tomcat server is quite easy on NB. No "install" as a traditional sense needed to do that:

  • Download any compressed (not installers) tomcat version from http://tomcat.apache.org
  • Just unzip (uncompress) in your preferred folder. You dont need do any thing else.
  • Go to Tools ---> Servers -----> Add server.
  • Select Apache Tomcat Server. Then on "server location" label, select the folder where you have uncompressed your Tomcat Server. You can define in this window your log and password. NB will automatically change your user.xml.

This is a good way to configure as many servers as you want, and easily configure its access and management data.

I hope it helps.

Solution 2

I had the same issue and I followed @Raph's answer and it worked. After that, I had another issue, Netbeans returned this error message:

Deployment error: Starting of Tomcat failed, check whether the /Applications/Tomcat/bin/catalina.sh and related scripts are executable

To solve this, in terminal, I navigated to tomcat-folder/bin and executed:

chmod 755 *.sh

And it solved my issue, cause it made the scripts executable.

Share:
17,832
Camus
Author by

Camus

Updated on June 22, 2022

Comments

  • Camus
    Camus almost 2 years

    I've just bought an iMac and would like to start programming on it. But I can't configure Tomcat and Netbeans to work together. I installed Tomcat and it seems it is working. But when I try to build a web application, netbeans ask all the time my user name and password. I already configured the user.xml but it's not working.

    Can anyone give a tip?

    Cheers

  • Camus
    Camus over 12 years
    Hi mate, thanks. But I did that and when I try to debug a web application to see it on the browser, Netbeans ask me for the user and password. I insert them and it's not working. Netbeans continues asking me for the user and password. I don't know what is happening because Tomcat is working fine. Thanks
  • Camus
    Camus over 12 years
    I put the Tomcat into the application folder and now I'm receiving this error.Deployment error: Starting of Tomcat failed, check whether the /Applications/Tomcat/bin/catalina.sh and related scripts are executable. See the server log for details.
  • Camus
    Camus over 12 years
    I did it. It's working now. I put the Tomcat folder inside the user/<myName>/Tomcat. Now it is working fine. Thanks all
  • gps
    gps over 8 years
    In my case, I had to download the tar.gz version.
  • Thor
    Thor over 7 years
    hi cawecoy, I know you posted almost three years ago, but if possible, could you please explain how the command "chmod 755 * .sh" actually works? maybe break it down a little bit? Thank you so much for the help!
  • cawecoy
    cawecoy over 7 years
    tony-stark yes: chmod 755 *.sh sets the following permissions for ALL shell scripts files *.sh: owners can write, read and execute those files 7; users from your group can read and execute those files 5; and others can read and execute those files 5. So after running that command inside the folder tomcat-folder/bin, Tomcat can finally execute /Applications/Tomcat/bin/catalina.sh and any other .sh files in that folder, hence the Deployment error is solved.