IDEA创建Java Enterprise项目

即在IDEA上创建动态web项目,需要ULTIMATE 版本,社区版本不适合

在观看教程的时候发现我安装的2020.2版本上没有教程上的动态创建过程,去官方文档(2020.1)中发现,2020.1版本及以前的版本可以通过以下方式进行创建

具体步骤为

1.Click Create New Project on the Welcome screen, or select File | New | Project. The New Project wizard opens.

2.In the left-hand pane, select Java Enterprise.

3.From the Project SDK list, select the JDK that you want to use in your project.

If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.

If you don't have the necessary JDK on your computer, select Download JDK.

4.Specify your application server. We'll use GlassFish Server.

If GlassFish is not defined in IntelliJ IDEA yet, click New to the right of the Application Server field and select Glassfish Server.

In the Glassfish Server dialog, specify the GlassFish Server installation directory.

5.Under Additional Libraries and Frameworks, select the Web Application checkbox.

官网建议用GlassFIsh的Web服务器,可以不用,我自己用的是Tomcat的,所以可以忽略

但是在看新的官方文档(2020.2)时内容已经发生了改变

具体步骤为:

1.From the main menu, select File | New | Project.

2.In the New Project dialog, select Java Enterprise. For this tutorial, use Java 1.8 as the project SDKs and leave other settings by default: Maven as the build tool and JUnit as the test runner. Select Java as your project language and click Next.

3.In the Libraries and Frameworks list, select the Servlet framework under Specifications and click Next.

4.Enter a name for your project: JavaEEHelloWorld. Then click Finish.

更详细的在官网中都有体现

首页的index.jsp 可以在Project目录下手动添加

官方文档真是一个好东西

扫描二维码关注公众号,回复: 12342356 查看本文章

猜你喜欢

转载自blog.csdn.net/baidu_36669549/article/details/109214036