• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

How to deploy WAR to Tomcat (which is server into Eclipse)

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

We need to customised our war file and we need to deploy it into our tomcat which is part of development. We have tomcat as part of Eclipse (server>new server). In normal circumstances, project is auto deploy to tomcat, but how to deploy customised war file to it.


Thanks & Regards,
Nitesh
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using ANT or Maven at all? Or are you asking which folder the WAR needs to be copied into?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or are you doing this entirely in Eclipse (in which case this is the wrong forum and we will move your post for you).
 
Nitesh Patel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter/Martijn,

We are trying to customized our development environment. Normally, when we have "dynamic web proj" in eclipse, it is automaticall deploy to local server. What we want to do is, when developer invoke particular task into his dev environment, it will compile, copy/move some files (like .properties file, img files,xml) to required directory structure and deploy it to local tomcat (of eclipse). Same way, developer, invoke particular task (different then the above), it will do the same thing, but generate war file which he can deploy to standalone server for further testing. We also like to add some task for testing different modules and make them part of deployment/war generation process.

Regards,
Nitesh
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is what we do.

First, Eclipse is a development environment. Each developer uses Eclipse and does development and testing in what ever way works best for them, including deploying to their local app server.

Once code is written, tested and meets our various coding guidelines, the developer checks the changes into a central source code repository.

Then a continuous integration service (Hudson) does a build and test and deploys to a system test machine. There is another automated process that on a push-button deploys the app to production. In all cases, we use Maven and/or Ant to do our builds, testing and deployment.

We NEVER deploy from Eclipse into either the system/integration test or production environment - that is just asking for trouble.

(Your original post might have been Eclipse centric, but notice how I deftly turned it into an Ant/Maven-centric post! )
 
Nitesh Patel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter,

I agreed with you regarding automation for testing deployment on different server. But we are still in initial stage and our current requirent is not that much (or we cann't afford that number of servers). Basically, we have to follow slightly different directory structures like seperate location for label properties file, seperate location for error message properties file, seperate location for config properties files etc. If we follow default structure of "dynamic web project" then we must have to put files at their repsective location. If we can tweak it then it is more better and helpful for team to manage.

That's reason, we need to make custom build in Dev environment so when developer build, it will move/copy files from respective location and generate required deployment structure into local server.

Regards,
Nitesh
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When running you web application from inside Eclipse - it runs in your local Tomcat server (not located inside Eclipse).

If you know how a WAR file look like inside, then you just have to build it with maven and/or ant, and then deploy it in your local Tomcat server - now how or where is a WAR deployed inside Tomcat ?? - hint: look in the root of your local tomcat, and there you should find a 'webapps' folder.

Here you can read about how you deploy on Tomcat: http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic