-1

i have a Servlet 5.0 with JDK 17 project which is build by Gradlebuild tool and use Tomcat 10 as a server to run. but i am afraid, when i change java file these changes can not deployed on server and also there is not "compile on save" option in a gradle project for compiling automatically. so after a change i have to select clean and build option on my project to be deployed war file on server

i except that when i change web file or java classes i can see the changes on browser without clean and build option

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • What is the _exact_ version of Tomcat 10 that you are using? Although not directly related to your question, your use of Servlet Spec 5.0 suggests that your version of Tomcat is some flavor of 10.0.x, and [that has been superseded](https://tomcat.apache.org/whichversion.html). I just built and ran a Gradle web project on NetBeans 18 using Tomcat 10.1.5 and it worked fine, so if you are on Tomcat 10.0.x [consider upgrading to 10.1.x](https://tomcat.apache.org/download-10.cgi)... – skomisa Aug 29 '23 at 22:56
  • ...And while it is true that NetBeans does not have a _"compile on save"_ option for Gradle projects, my experience is that if you clean and build a Gradle project there is no need to save your changed file first - NetBeans does that for you. So I don't see that the absence of _"compile on save"_ is really a significant issue. Instead of saving the file triggering an automatic build, you build the project and that triggers an automatic save. – skomisa Aug 29 '23 at 22:59

0 Answers0