PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, July 13, 2022

[FIXED] How do deploy just my static content in Tomcat / Eclipse?

 July 13, 2022     eclipse, java, tomcat, web-deployment     No comments   

Issue

I am doing development of a web app with Java. My current process is to export the project as a WAR to the Tomcat folder, where it picks it up and reloads the WAR. I wait for it to run through its startup process and away it goes.

I would like to make it not need to do an entire reload when it isn't necessary. If I'm making a small change to a single class, perhaps it could reload just that class. If I'm changing static content, perhaps it could just send that HTML file or JS file.

How can I achieve this? My only real dealbreakers is that I need a solution that works with Eclipse. I'd even consider a different container than Tomcat, although it's where I'm familiar.


Solution

You can hot reload/deploy your application inside Eclipse , but for seperate Tomcat server , I don't think hot reload is possible .

For Eclipse

For eclipse , you can follow the instructions in this link https://mkyong.com/eclipse/how-to-configure-hot-deploy-in-eclipse/

This will speed up your development , but it has it's limitations

Hot deploy will support the code changes in the method implementation only. If you add a new class or a new method, restart is still required.

For Tomcat

I haven't tried it , but all the class files of war will be loaded/rendered from binary memory of Tomcat . So try changing the class files in that location(Not sure about the path of binary class folder ) .

But if you want to render static HTML,js and css from tomcat server , it can be easily done adding another folder inside "webapps" folder (eg : /webappps/static)



Answered By - Umeshwaran
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing