Original: Intellij idea Getting started with creating Web projects (i)
Related software:
Intellij idea14:http://pan.baidu.com/s/1nu16vydjdk7:http://pan.baidu.com/s/ 1destj5ftomcat (apache-tomcat-6.0.43): Http://pan.baidu.com/s/1kUwReQF Intellij idea installation is very simple, step by step installation. The installation of JDK is also very simple, it is important to configure the environment. Add the Java installation path to the environment variable path. Tomcat folder does not have to install, directly decompression placed in the C-drive, or put in other folders can also, but the name of the folder is best not to take Chinese ~ ~ ~ Do not believe? You try it. Idea to create a Web project step:
1. Create a projectEnter project name "Demos", File-and New project, and choose Project SDK as 1.7, Next
2. Create a moduleClick on the item name in the mouse point demos, choose New, select module input module name "Firstweb", tap next to check "Web application", confirm that "Create Web. Xml" is selected-& Gt Finish
3. Create a good Web project
4. Create two folders under Web/web-inf: Classes and LibThe classes is used to store the compiled output class file, and Lib is used to store third-party jar packages.
5. Configure folder pathFile, Project Structure (shortcut: Ctrl + Shift + Alt + S), select module: Select Paths, select the Use module compile output pat H, select the Classes folder that you just created for both output path and test output path. Then choose Dependencies, select the Module SDK as 1.7, click on the right "+" and select 1 "Jars or Directories", select the Lib folder you just created, select "J AR directory "and then return to OK on the line ~ ~
6. Configuring the Tomcat ContainerOpen menu Run, select Edit Configuration click "+" and select "Tomcat Server", select "Local" to enter a new service name at "name" and then click "Application Server" "Configure ...", pop up the Tomcat server window, select the locally installed Tomcat directory and OK in the Server palette of the Run/debug Configurations window, uncheck the "after Launch ", set" HTTP port "and" JMX port "(default), click Apply, OK, this is the Tomcat configuration complete.
7. Deploy and run the project in TomcatRun, Edit configurations, go to "run/debug Configurations" window, select the Tomcat container you just created, select Deployment, click on the "+" sign on the right-&G T Select artifact, select Web project, application context can be filled with "/hello" (in fact, can not fill the ~ ~), OK
8. Edit the index.jsp file
9. Run Tomcat to view running results in the browser
Intellij idea Getting started with creating Web projects (i)