So i have this huge java application running on a ubuntu server. How i go about updating a single .java file? I have to recompile the war and upload? Can i edit/compile it remotely?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The WAR is likely expanded on the server. If the file is simply a JSP, it can be edited in place where it’s expanded. If it’s a class, you’ll need to recompile the necessary java file (which may well not be on the sight) and replace the class file that exists within the war.
If you just change the JSP, you can likely simply leave it be as Tomcat normally detects the change and recompiles the JSP automatically (it may not, it’s just likely).
If you want to change a class file, the safest bet is to restart the server after you’ve made the change.
Note if you make changes, if the original war is replaced or has its modification date changed, you will lose any changes made to the expanded WAR archive.
These all apply under typical use cases, but may not apply to your specific installation.