right jsp include or ant import support

In any professional products, jsp's and ant scripts get broken into many small small files and there would be a root jsp or root ant file from which these child files get included.

In such senario, Intellij complaints of the errors when child file is opened. This is Intellij seen child as complete file by it self.

May be if there is a way to define parent jsp or parent ant file as per the deployment directory structure, opening of the child should take the pages relative to parent location etc.


In source jsp directory a.jsp is in location

src/resources/jsp directory.

but all these files get copied at build time to /WEB-INF/jsp folder

<%@ include file="/WEB-INF/jsp/include.jsp" %>

<div >
    <spring:message code="book.view.title"/>

Then Intellij once provides a way to say that /WEB-INF/jsp/ is actually src/resources/jsp etc.

similar example on ant

root root.xml

<?xml version='1.0' encoding='ISO-8859-1'?>
<project name='TezzD-JEE' default='all'>

<property name='openSSL.exe.path'

    <import file='TDJEEModule.xml'/>

and when TDJEEModule.xml is located some where and it tries to use the property openSSL.exe.path.. the there should be way for Intellij to tell or automatically recognised that TDJEEModule is used by root.xml and when TDJEEModule.xml is open it should not complain about no property with name openSSL.exe.path

Basically if Intellij is told about some thing as a child and its parent i.e reverse assocation.. then Intellij can do better allow refactoring of jsp's and ant script files etc..

Raja Nagendra Kumar,
-Onestop for Offshore Java Product Engineering Excellence


As for JSPs, you have a way to map your source folders to logical paths.
Create a web facet in your module and configure Web Resource Directories as
described here:


For JSP files, you can click on Hector (the little guy in the status bar) and configure the File Context in the popup that appears.