In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Most people do not understand the knowledge points of this article "what are the methods and principles of deployment under the jspXCMS development environment", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article, "what are the methods and principles of deployment under the jspXCMS development environment?"
Tomcat deployment directory
Tomcat deployment is very simple, just copy the program to the {Tomcat installation directory} / webapps directory. There will be many default folders in this directory, such as docs examples host-manager manager ROOT, which are Tomcat documents, demos, and management platforms, which are not needed in actual use, and may even pose security risks if not configured properly. So delete these folders before you deploy.
There is a special folder ROOT under webapps, which is placed as the root directory for Tomcat access, for example, the access address of / webapps/ROOT/index.html is http://localhost:8080/index.html. The access address of / webapps/abc/index.html is http://localhost:8080/abc/index.html. So in most cases, it is deployed in the ROOT directory.
You can change the deployment location of tomcat by modifying the server.xml file of tomcat, but we do not recommend that you do so if you are not very proficient in Tomcat. This practice should be abandoned, especially when the deployment encounters errors. We have come across a lot of cases of errors caused by changing the tomcat configuration.
Relationship between maven directory structure and deployment
/ src/main/java/ source code directory. It is compiled and saved in the / target/classes/ directory. This directory does not need to be directly involved in deployment.
/ src/main/resources/ resource directory. It will also be saved in the / target/classes/ directory after compilation. This directory does not need to be directly involved in deployment.
/ src/main/wabapp/ web program pages, pictures, css, js and other files. The files in this directory can need to be deployed in the {tomcat} / webapps/ROOT/ directory. Such as / src/main/webapp/index.html, deploy to {tomcat} / webapps/ROOT/index.html.
The directory is automatically generated when / target/classes/ is compiled, containing the contents of / src/main/java/ and / src/main/resources/. The files in this directory need to be deployed in the {tomcat} / webapps/ROOT/WEB-INF/classes/ directory.
To sum up, just copy / src/main/wabapp/ and / target/classes/ to the corresponding directory of tomcat, but there is still a lack of dependency packages, that is, the jar package under the {tomcat} / webapps/ROOT/WEB-INF/lib/ directory.
Maven packing
You can get the complete war package using mvn package or mav install. Packaging can be achieved by directly using the maven command in the command exercise, or by using the corresponding functions in development tools such as eclipse, idea, etc.
After packaging, a file similar to jspxcms-9.0.0.war appears in the / target directory. War files and zip files are in the same format and can be opened using decompression software. The unzipped file is composed of / src/main/wabapp/, / target/classes/ and dependency package / WEB-INF/lib/ above.
War deployment
The war file can be directly deployed to {Tomcat installation directory} / webapps/ and will be extracted automatically after running tomcat. The extracted directory is the same as the war file name, for example, {Tomcat installation directory} / webapps/jspxcms-9.0.0.war will be extracted into {Tomcat installation directory} / webapps/jspxcms-9.0.0. From the above knowledge, you can know that to access this program, the access address should be http://localhost:8080/jspxcms-9.0.0/, and the access address http://localhost:8080/ is inaccessible. This is obviously not what we want. At this point, you need to rename jspxcms-9.0.0.war to ROOT.war, unzip it and change it to {Tomcat installation directory} / webapps/ROOT/, so that it can be accessed through http://localhost:8080/.
It is important to note that if a directory already exists {Tomcat installation directory} / webapps/ROOT/, only replaces the ROOT.war package, so it will not be re-unzipped. You need to delete the ROOT directory and replace the ROOT.war file before it can be unzipped again.
The above is the content of this article on "what are the methods and principles of deployment in the jspXCMS development environment". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.