Is there a way to enable the Web facet and set the Web spec to 2.5 in order to let IDEA recognize trimDirectiveWhitespaces without creating a web.xml file?
This is mainly needed for a CQ5 CMS app.
It contains a bunch of JSP files that use trimDirectiveWhitespaces but it doesn't need a web.xml file.
Right now IDEA marks trimDirectiveWhitespaces as error.
if I add the Web facet and generate a web.xml with the 2.5 of the spec, IDEA recognized the directive. But ideally I don't want the web.xml to be generated.
In the meantime I have added web.xml to .gitignore, but can I just avoid generating it altogehter?
Thanks,
Behrang
请先登录再写评论。
Can't reproduce your case. What IDEA version do you have?
Regards,
Alexander.
I am using IDEA 13.0.2.

Unless I add the Web facet and create a web.xml file for version 2.5 or higher of the spec from here:
IDEA marks trimDirectiveWhitespaces as red for me:
<%@ page session="false" trimDirectiveWhitespaces="true" %>
As this is an Adobe CQ5 project, we don't need a web.xml file. I have a few options such as creating a dummy file and adding it to git ignore but is there a way to configure IDEA to run inspections agains V 2.5 or later of the spec without first having to create a web.xml file?
You can add Web facet not creating web.xml. For me the facet is enough to cure the problem. Is it acceptable to you?
Regards,
Alexander.
Thanks for the reply. Apart from adding the Web facet, I also had to add the content root folder to let IDEA recognize trimDirectiveWhitespaces.