Moved since you have no code but you have questions.

You can find the answer to your first question by searching the Internet for 'apache tomcat' and to the second by searching for a Netbeans...