In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Prerequisite: download and install intellij and meavn
Here are the steps:
1. First create a new web using meavn.
Use 'windows + r' to open the command console and type mvn-version to verify that the installation is successful
Then the mvn archetype:generate command will prompt you what kind of project to build.
Enter 10 here to create a web project
The following will let you enter groupId and artiFactId and so on. Refer to the configuration of my blog meavn.
two。 After building the project with meavn, you need to open it with intellij, as shown in the following figure
Just find the project you built, which is usually under C:\ Users\ your hostname\ IdeaProjects by default
3. After introduction, three points need to be modified and established.
First: add struts2 dependencies to the pom.xml file. Here you can access the http://mvnrepository.com/
Looking for dependence here.
Org.apache.struts struts2-core 2.3.32
There is no problem with the personal test here, but if it is 2.5.13, there may be some problems, which will lead to
Struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
The class for filter-class cannot be found here. Will report some one or more filter failed work...
But if you change the class name here to
Org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
Note: also let these dependencies load themselves, as follows
And then open it.
Click the red circle mark and let the dependent jar package import on its own!
Second: add to web.xml
Struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 / *
Here is all, generally only need to join
Just do it.
Third: create a struts.xml file in the resource directory as follows
So it's complete. Can run directly, here will not explain how to configure tomcat and so on. Own Baidu
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.