Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA resolving web paths in JSP

How can I set where IntelliJ looks for files referenced in a JSP? If I have

<jsp:include page="/foo/bar" />

it cannot resolve directory foo.

It looks like Settings > Web Contexts deals with this, but when I go there, it says

No web directories found

like image 635
user316146 Avatar asked Feb 14 '13 15:02

user316146


1 Answers

You should configure a web facet in your project settings, then configure the directory containing foo as a "Web Resource Directory". If this is your root directory, set the "Path Relative to Deployment Root" to /.

See the official doc for more info.

like image 136
Bastien Jansen Avatar answered Oct 07 '22 12:10

Bastien Jansen