Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
325 views
in Technique[技术] by (71.8m points)

java - How to deploy war files to tomcat manually?

I have a war at location "C:Documents and SettingsmyProj.war".

The web project is also available at "C:Documents and SettingsmyProj".

I want to deploy this to one tomcat.

location of the tomcat is "C:Documents and Settingsomcat6x".

Please tell me how to do this manually or through command prompt.

One application is already running in Tomcat. It is a maven project. I want to deploy another application on same tomcat which is not maven application.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

These are the steps I follow when I have to manually deploy a war in Tomcat on localhost:

  1. If Tomcat is running, stop/kill it.

  2. Go to the tomcat installation folder (this must be C:Documents and Settingsomcat6x for you), let's call it <tomcat>.

  3. In <tomcat>, delete the temp and work folders. They only contain temporary files.

  4. If it's a jar file maybe is for configuration, so drop it in <tomcat>/lib folder. If it's a war file, drop it in <tomcat>/deploy or in <tomcat>/webapps folder.

  5. Start your tomcat.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...