generating Deployment Descriptor (web.xml) in intellij
Asked Answered
B

3

6

I'm using gradle for my spring projects and need to copy and paste the content of web.xml (and also other xml based spring configurations) every single time! Is there anyway to auto generate these files, like the way it can be done in eclipse?

Briannebriano answered 4/2, 2015 at 18:7 Comment(0)
B
3

OK the best way I know till now is creating a New Template file for different xml files:

Right Click on project > New > Edit File Template > ...

Briannebriano answered 4/2, 2015 at 18:42 Comment(0)
N
7

The 1st answer is great way for creating own file template. But Intellij has already generated default templates for web.xml and Spring file.

As for now, by using alt + ins, Intellij provides JSP Tag Library Descriptor, New Faces Config File, and Spring Config which is helpful for xml based spring configurations.

And for web.xml file, Project Structure (ctrl + alt + shift + s) > Facets > Deployment Descriptors > + > web.xml will generate a web.xml file for you.

Nester answered 24/6, 2019 at 10:24 Comment(1)
By now idea 2020.2, you have to create the web module in Modules side menu, and put the right web.xml path to it.Audiovisual
B
3

OK the best way I know till now is creating a New Template file for different xml files:

Right Click on project > New > Edit File Template > ...

Briannebriano answered 4/2, 2015 at 18:42 Comment(0)
E
0

According to the IntelliJ IDEA documentation you can generate deployment descriptors using the web facet settings: Managing deployment descriptors - At least since version 2016.1

Evslin answered 2/7, 2016 at 17:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.