Skip to main contentdfsdf

Home/ fshoeyellow92's Library/ Notes/ It truly is not advised to integrate tomcat with eclipse server: tomcat is integrated into eclipse. When restarting tomcat, server.xml is restored. .TXT

It truly is not advised to integrate tomcat with eclipse server: tomcat is integrated into eclipse. When restarting tomcat, server.xml is restored. .TXT

from web site

data recovery hard drive software

(Transfer) Solution to restore Server.xml when starting Tomcat server in Eclipseforj2ee
Time 2013-09-2220:28:00 Blog Park-All original essay location original http://www.cnblogs.com/just2do/p/3333786.html So that you can publish the internet project using a custom path towards the Tomcat server, we need to have to modify The server.xml in the conf folder, like adding Contextpath='/brball'docBase='E:\\JavaWeb\\brball\\WebContent'/ tag towards the Host, but when I make use of the eclipse-jee-kepler version, every time Open Eclipse, start out the Tomcat server, the server.xml file will be restored, the Context tag just saved is missing, causing the server to find the corresponding resource, a 404 error occurs, so I constantly use a stupid method, which is, back up the server.xml ahead of time File, and after that replace the restored file, this also functions, but difficulty, I tinkered with Eclipse these days, and lastly discovered the explanation why server.xml was restored, when the original Tomcat server was began in Eclipse, Eclipse was automatically released Deployed within the project, but my project is manually deployed outside, Eclipse only recognizes the project deployed in it, so it's going to develop a new server.xml file to cover the original file, only the project deployed in Eclipse In this case, we only want to cancel the automatic publishing function.
[I, use a custom web deployment method]
In D:\\atool\\apache-tomcat-7.0.52\\conf\\Catalina\\localhost\\application name.xml
Often, we need to add some external information supply or other inside the application name.xml, and then within the eclipse

At this point, eclipse will automatically publish its configuration initial, so each time we restart, our application name.xml will be restored to the original eclipse settings.
Solution:
Pick Window-Preferences-Server-Launching in turn, cancel Automaticallypublishwenstartingservers, click OK, and get it.

The above system causes eclipse to no longer automatically compile and generate the project directory, which does far more harm than excellent.


===


About eclipse and tomcat encountered context.xml out of synchronization problem Time: 2010-03-0823:47 click: 1414 times font: [big middle small]


The
When making use of context.xml, I straight added the resource code in context.xml in tomcat's conf, and later ran it, and later modified the username and password in context.xml, and the outcome was not appropriate. Debugging identified that the user name and password have not been changed. It turned out to become out of sync, so I looked for the purpose in tomcat. It seems that when building with eclipse, the project won't be deployed in tomcat, so I cannot find the explanation. Finally, diskgetor data recovery software identified that there is certainly context.xml inside the folder that comes together with the technique in the workspace of eclipse, so I modified it, as well as the outcome is appropriate.

It turned out that the explanation for eclipse was that it saved context.xml for us, but then we only changed the context.xml in tomcat, however it was executed when the context.xml in eclipse was executed, so it was not synchronized.
But there is nevertheless a query, how does eclipse know what context.xml I have to have? I didn't make a brand new context.xml? It might be that I wrote resource-ref inside the web.xml of the project, which includes the resource of context.xml in tomcat, established the corresponding relationship, and automatically extracted it. Later, full version feel it was copied directly from the context.xml in tomcat.



My understanding:
tomcat is integrated into eclipse, but eclipse won't alter the original tomcat system-level files.
Every time you restart the application, eclipse saves a copy of your default configuration of tomcat. For those who manually modify tomcat’s context.xml and server.xml or confi/localhost/app.xml, so long as you click the tomcat restart button in eclipse, it'll automatically Eclipse's tomcat configuration covers the past.
If eclipse is prohibited from automatically refreshing the project and configuration, then eclipse will no longer automatically compile and create corresponding files and directories within the deployment directory.
In view from the fact that we may perhaps require to reference external resources, we have to have to manually adjust the tomcat configuration file. As a result, it really is not advisable to directly use the server in eclipse: tomcat.
fshoeyellow92

Saved by fshoeyellow92

on Jun 12, 20