• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Eclipse/Tomcat configuration

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have never worked on java web application. I have a .war file for an application(I don't have access to source for this war) that I have to deploy in Tomcat. I directly put this war in the <tomcat-install-dir>/webapps and ran catalina.sh directly. This made sure that the war deployed fine for now.

I now want to deploy this war file using Tomcat that is set up in eclipse. How can I make sure that my tomcat(configured in eclipse) can deploy the war directly from eclipse?

I also have a java project in my eclipse. It is not a dynamic web project. The source code in this java project is used as a jar in the war file that I deployed to tomcat.
Right now, I am building the jar, and copying it to <tomcat-install-dir>/webapps/<app-name>/WEB-INF/lib and then restarting tomcat to make sure my changes are reflected in the application.

Is there an easier way in eclipse so that my source code changes are directly copied to the deployed application using eclipse and the tomcat setup in eclipse?

Any advice will be appreciated.
 
Ranch Hand
Posts: 1164
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the ranch Rahul.

If it were simple java source file, then Tomcat automatically re reads the WEB-INF/classes then yes, it is surely possible. Read this. Is this what you are looking for? I am not sure that it works for jars though. To be specific, I quote the first few lines that say:

http://localhost:8080/manager/reload?path=/examples
Signal an existing application to shut itself down and reload. This can be useful when the web application context is not reloadable and you have updated classes or property files in the /WEB-INF/classes directory or when you have added or updated jar files in the /WEB-INF/lib directory.



Is this the problem that you are facing, updating a jar and you want the application to reload? Check if it works.


EDIT: Not sure if this is the right forum for this query. Post it here You might get better / quicker responses.
 
Ak Rahul
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mansukh. I don't think this is what I am looking....but thanks for directing me to the right group.
 
Ranch Hand
Posts: 50
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ak Rahul wrote:Hi,

Is there an easier way in eclipse so that my source code changes are directly copied to the deployed application using eclipse and the tomcat setup in eclipse?

Any advice will be appreciated.




You can try with ANT. Write a script for compiling and copying file [from your source location to tomcat location where you want to place] and execute the particular target alone from eclipse.
 
That feels good. Thanks. Here's a tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!