IntelliJ IDEA如何在Gradle项目中支持Web Application
来源:互联网 发布:安卓订餐系统源码 编辑:程序博客网 时间:2024/06/05 00:31
总结步骤如下:
Enabling Web Application Support
The dedicated Web facet provides facilities for developing Web applications, sets up the relevant module structure, and creates the required deployment descriptors. You can create anew module with a dedicated Web Application facet from scratch or add a facet to anexisting module.
IntelliJ IDEA configures the module as follows:
- Creates the structure of the module with the web andWEB-INF nodes.
- Creates a Web application deployment descriptor web.xml under theWEB-INF node .
This is done automatically for versions 2.2 - 2.5.
- Creates an index.jsp file that will be the home page of your application and stores it below theweb node.
- Configures a basic artifact of the typeexploded with the following structure:
You can use this configuration as is or customize it, as required, for example, includestatic Web content resources.
- Create a Java module from scratch.
On the first page of the wizard, select Java Module, notWeb Module. (The Web module type is for developing web applications using programming languages other than Java, for example,PHP, or JavaScript, ormarkup languages.)
- On the fourth, Select the desired technologies, page of the wizard, select theWeb Application check box.
- From the Version drop-down list, select the relevant specification. The available options are:
- 2.2 - 2.5 - if you choose one of these options, IntelliJ IDEA will create a Web application deployment descriptor for you automatically.
- 3.0 - if you choose this option, select the Create web.xml check box to have a Web application deployment descriptor created. Clear the check box to use annotations instead.
- Add a Web facet to the module andopen its settings. The right-hand pane shows theWeb Facet settings.
- The Deployment Descriptors area shows the location of theweb.xml deployment descriptor, which is already created for you. To change its location or version, click (Enter).
- To assign another existing descriptor, click (Alt+Delete) and confirm deletion in theDelete Deployment Descriptor dialog box that opens. To have the current descriptor removed from your computer, select theAlso delete file from disk check box and clickYes. In theDeployment Descriptors area, where IntelliJ IDEA returns you, click (Alt+Insert) and select the desired version and file in theDeployment Descriptor Location dialog box that opens.
- If your application server needs a proprietary deployment descriptor, click theAdd Application Server Specific Descriptor button and select your server from the list.
No matter whether you are creating a module from scratch or adding a Web facet to an existing module, IntelliJ IDEA detects conflicts and suggests to resolve them.
- If some required libraries are missing, click the Fix button. The necessary libraries will be downloaded and installed automatically.
- If the facet resources are not included in any of the previously configured artifacts, click the Fix button and choose the appropriate artifact from the list.
- If no artifacts of the relevant type are configured, click the Create Artifact button and configure the artifact layout on the Artifacts page of the Project Structure dialog box that opens.
- IntelliJ IDEA如何在Gradle项目中支持Web Application
- IntelliJ IDEA如何导入Gradle项目
- intelliJ idea 中添加gradle java项目
- Intellij IDEA 使得Web项目在Tomcat中部署运行
- IntelliJ IDEA 15 创建maven项目(新建项目Artifacts中无法添加Web Application:Exploded)
- 如何在 IntelliJ IDEA 中的 Gradle 项目上使用 Mybatis Generator 自动生成代码
- IntelliJ IDEA 2016中创建web application项目和发布部署tomcat
- 如何使用Intellij idea 创建web项目
- Intellij Idea中如何打开Ant项目
- 在IntelliJ IDEA中创建Spring项目
- 在IntelliJ IDEA中创建Spring项目
- 在IDEA中创建Gradle项目
- 如何在Intellij Idea中使用GitHub
- 如何在Intellij IDEA中修改快捷键
- 如何使用Intellij和Gradle开发JAVA Web项目
- 在Intellij IDEA 11中利用jetty plugin调试maven web项目
- Intellij IDEA 创建Web项目并在Tomcat中部署运行
- Intellij IDEA 创建Web项目并在Tomcat中部署运行
- c++ 自己遇到的编程陷阱或技巧
- cocos2d-x 3.0 正式版 项目创建
- wpf之TreeView绑定
- 初学Java,List和ListIterator
- Optimal Parking
- IntelliJ IDEA如何在Gradle项目中支持Web Application
- 1856-More is better-基础并查集
- 【LeetCode】- 面试频率和难度分析
- Shopaholic
- hdu 3067 小t的游戏 (找规律)
- Common FileUpload组件的使用
- War
- hdu1686
- html2