Two ways for move war file from Netbeans to Tomcat 8.
In last post we create in Netbeans WebApp application(jsp website). But if you want to run this application in tomcat without use Netbeans IDE, do these things describing below.
First open Netbeans IDE and right click on project name and choose Clear and Build.
Go to dist folder with your project files in NetbeansProjects catalogue. In my system it is in My Documents folder. Copy WebApps.war file.
Go to the webapps folder in your tomcat instalation folder and paste this file in it.
Then open console and go to tomcat 8 installation catalogue and write startup command. Type Enter.
The Tomcat 8 server is running.
Open browser and type in address field http://locahost:9090/WebApp.
The application is running. If you want stop server, write in console in tomcat installation folder shutdown command.
Another way for move application from Netbeans IDE is Manager App in tomcat.
So delete from webapps WebApp.war file and from D:\tomcat8\conf\Catalina\localhost WebApp.xml file – configuration file of WebApp application.
Run tomcat 8 from console as before,
Open browser and type in it address:
Http://locahost:9090/
The server ask You for user and password, so write in it user as tomcat and password as tomcat. These atat are configured in tomcat-users.xml file in conf tomcat folder.
You see list of all applications and tools.
Go to WAR file to deploy section and browse WebApp.war file from C:\Users\admin\Documents\NetBeansProjects\WebApp\dist.
Click the Deploy button to move application war file into tomcat webapps folder.
Click on WebApp link to your application. The application will be display.
In webapps folder in tomcat you see WebApp.war file and unpacked webapp catalogue for this application, but D:\tomcat8\conf\Catalina\localhost folder will be empty.
So if you copy war file from Netbeans and paste it into webapps folder, in tomcat will be creating in D:\tomcat8\conf\Catalina\localhost configuration file: WebApp.xml,
But if you browse war file from Manager App in tomcat and deploy this application, in webapps folder in tomcat will be unpacked war archive as webapp catalogue.