The 1th of today's summary is to use idea to write JSPs under Windows and use Tomcat to deploy, and the 2nd is to create a new MAVEN project that has never been heard or practiced before, and today is probably a bit of a talk.
0x01
Idea full name IntelliJ idea, is the Java language Development integration Environment, I downloaded the Community 14 version
And then, step by step, the resulting directory structure is
Now that the code is there, it needs to be deployed to the server software, and I'm using Tomcat to deploy the Tomcat approach in idea:
The approximate configuration place is the arrow at a few places, after configuration, click on the run of the green Triangle button, the Web address bar localhost:8080/idnex.jsp access to the.
0x02
This is mainly in the use of Maven encountered a problem, I use the decompression of the official website to download the compressed package, decompression, configure the environment variables, through the maven-v on the command line to see the MAVEN version number and so on, the local installation success, after the installation is successful, it needs to be configured in idea
Now that you've configured it, you can create a new MAVEN project,
One step at a time, there is a place to fill in the parameters, add a parameter archetypeCatalog=internal
, do not add this parameter, MAVEN generated skeleton when the time will be very slow, and sometimes directly stuck.
Explanations from the Internet:
Archetypecatalog represents the plug-in uses the archetype metadata, does not add this parameter when the default is Remote,local, that is, the central warehouse archetype metadata, because the central warehouse archetype too much, so the result is very slow, Specify internal to indicate that only internal metadata is used.
The following MAVEN project is available, Maven my current use is just to manage the jar package, and I added the Pom.xml
This is the code of the JUnit package, after the run found the local repository has, but did not appear in the
This place, this is later success has, before is not, so as long as I used the @test place always error, and right click New when can not create a new jsp,class, the problem appears where? After a practice finding that idea did not identify the project as a MAVEN project, he would not have identified pom.xml and would not have been able to download JUnit's jar package, how to solve it?
The solution is to find it in idea.
After finding this module, there was junit at the end, at which point
There is a jar package at the extra dependency package, and the new class and JSP are also available.
This is, of course, the way we manage the jar package imports through MAVEN, and find that if you don't really import the jar packages in the warehouse, the manual import is
Can be imported manually after entering.
Reference:
Http://mark.leanote.com/post/%E4%BD%BF%E7%94%A8IntelliJ-IDEA-14%E5%92%8CMaven%E5%88%9B%E5%BB%BAjava-web%E9%A1%B9%E7%9B%AE
http://www.micmiu.com/software/common/intellij-idea-create-maven-web/
Http://www.open-open.com/lib/view/open1388650391891.html
Using idea to write Javaweb and maven synthesis (i)