Test and experience of using Tomcat's Manager feature

zhaozj2021-02-16  55

Experiments and experiences using Tomcat4 Manager feature. A) Enable Manager function. When testing Struts, modify the struts-config.xml file and you need to restart Tomcat for testing. Every time I feel very trouble, I suddenly remembered the Manager function of the previously used Tomcat, which can be easily launched, stop, restart, removal, etc., but can save the trouble of recurring the entire container server. Enter Address: http: // localhost: 8080 / manager / html total prompt no permissions. Open the Server / WebApps / Manager directory, did not see the JSP, servlet file. Doesn't find the corresponding management servlet. It should define the web.xml file definition. The system is used: org.apache.catalina.servlets.htmlManagerServlet, this class is in the J2EE.jar package. Under Server / WebApps / Manager / Web-INF / LIB, restart Tomcat. Discovery message: Because servlet.class in J2EE.jar includes servelet 2.3, Tomcat is not loaded JAR. Open this file with WinRAR and delete the servlet directory. Restart Tomcat, or you can't use the Manage function. There is no way, hard my scalp looks its E text help document. It turns out that the role of the management is needed in the conf / tomcat-users.xml file. Add a line to the XML file, is authorized to ROOT. Restart, everything OK. It can be used to manage the management function of Tomcat, which is very convenient. You can try it. 2) Manage use experience. In fact, this experience is when I used, I used notes. Everyone is interested, you can read it first, have a problem with me.

version:. 4.1.24 by caozhaoyong 1. tomcat directories structure of webapps you have many ways to define context (root virtual path and file path, it's a map.): a define context in file:. tomcat / conf / server.xml The content likes this: b. Put the content block in a seperate file xxx.xml, and copy the file to tomcat / webapps / Rember:. one file maps one web application, you can specifile the xml file name as you want c put your web application directory in tomcat / webapps, and then.. you can visit it: ... / yourwebapp you need tomcat first Tomcat will check $ tomcat $ / webapps / * xml files, add all these contexts and all directories in tomcat / webapps to the tomcat services, do not try... to put some other formatted xml files here, tomcat will complain some errors at the start stage you can visit all the directories in tomcat / webapp /, http:. // localhost: 8080 / webapplicationname 2. Root is a special directory, you Can't visit it via http: // localhost: 8080 / root. You can Root to root and the you can Treat It as regular Directory and Normal Web Application. You can change the default root webapp in tomcat / conf / server. XML File, Check It. 3. Use "Tomcat Web Application Manager"

. To manager web application the manager url is: http: // localhost: 8080 / manager / html / you can start, stop, reload and remove the web applicaitons manager lists all the web applications in tomcat services if you add some new.. web applications, you should restart tomcat and then the manager can list the new web application name, then you can operate the web application but you have another way to achieve it, use install method in manager input your new context:.. / aaa input The Real Directory: File: // D: / Tomcat / WebApps / AAA Click: Install You Can Visit Your New Web Application: http: // localhsot: 8080 / aaa caution: 1. if you don't define web-infin aaa, you can use the web application just after you install it. but if you restart tomcat, the webapp will be unvaliable. you must create web-inf in you web applicaiton, but you can let the directory include nothing. 2. don ' T USE "Remove" in Manager Pages if Your Web Application Directory Just In Tomcat / WebApps, IT Will Drop Your Webpplicaiton from you hard disk completely! If your web application in other directories, you can just remove the context from tomcat services. and you can reinstall it to the services or restart tomcat. End .. hajavaor@eyou.com19843788

转载请注明原文地址:https://www.9cbs.com/read-22365.html

New Post(0)