Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

generating Deployment Descriptor (web.xml) in intellij

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?

like image 449
Yar Avatar asked Feb 04 '15 18:02

Yar


2 Answers

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.

like image 194
Lu Han Avatar answered Sep 22 '22 01:09

Lu Han


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 > ...

like image 24
Yar Avatar answered Sep 18 '22 01:09

Yar