I have copied the sample.war
file into the webapps
directory of Tomcat, and I can access localhost:8080
.
Now how will Tomcat deploy it, I mean do I need to open it in browser? How can I access the application?
I have copied the sample.war
file into the webapps
directory of Tomcat, and I can access localhost:8080
.
Now how will Tomcat deploy it, I mean do I need to open it in browser? How can I access the application?
Manual steps - Windows
Copy the .war file (E.g.: prj.war) to
%CATALINA_HOME%\webapps
( E.g.: C:\tomcat\webapps )Run
%CATALINA_HOME%\bin\startup.bat
Your .war file will be extracted automatically to a folder that has the same name (without extension) (E.g.: prj)
Go to
%CATALINA_HOME%\conf\server.xml
and take the port for the HTTP protocol.<Connector port="8080" ... />
. The default value is 8080.Access the following URL:
[<protocol>://]localhost:<port>/folder/resourceName
(E.g.:
localhost:8080/folder/resourceName
)Don't try to access the URL without the
resourceName
because it won't work if there is no file likeindex.html
, or if there is no url pattern like "/
" or "/*
" in web.xml.The available main paths are here:
[<protocol>://]localhost:<port>/manager/html
(E.g.:http://localhost:8080/manager/html
) and they havetrue
on the "Running" column.Using the UI manager:
Go to
[<protocol>://]localhost:<port>/manager/html/
(usuallylocalhost:8080/manager/html/
)This is also achievable from
[<protocol>://]localhost:<port>
> Manager App)If you get:
go to
%CATALINA_HOME%\conf\tomcat-users.xml
and check that you have enabled a line like this:In the Deploy section, WAR file to deploy subsection, click on Browse....
Select the .war file (E.g.: prj.war) > click on Deploy.
This has been working for me:
If you try uploading the new file as a war file, with tomcat still running, it will attempt to expand it before it is all there. It will fail. Having failed, it will not try again. Thus, uploading a www file, then renaming it, allows the whole war file to be present before tomcat notices it.
Hint, don't forget to check that the war file's owner is tomcat (Use chown)
step-1. here I'm deploying pos.war First go to tomcat webapps folder and paste it
step-2. go to tomcat->bin folder start tomcat by clicking startup.bat
step-3. go to browser write localhost:port/project name eg. localhost:8080/pos (here my tomcat run on port 8080)
Done....
I followed the instruction in the following link, it works for me. http://www.coderanch.com/t/487178/Tomcat/war-file-show-load
After this, keep an eye on the catalina.xxxx-xx-xx.log to find out the issue.
Perform the following steps:
For deploying the war file over tomcat, Follow the below steps :
you will get one folder inside E:\Tomcat_Installation\webapps**put**
In this way you can deploy your war file in Apache Tomcat.