Under a Java EE enviroment, I have a web page built including several JSP files. Lets say one of the included JSP is header.jsp. Can be very similar to the one used by
The Maven WAR plugin, which is the plugin that handles the packaging of a WAR file for you, provides the "Overlay" mechanism to solve exactly this issue. You are already using the WAR plugin simply by having your project be of type "WAR"; maven uses that as a clue as to how to build your project, including use of the WAR plugin for the package phase binding.
The way the Overlay works is that your WAR file declares another WAR project as a dependency, just like you would delcare a dependency on a jar file you need. When the WAR plugin's package mojo fires, it will see this dependency on another WAR and build your new war as a combination of the two. Note, there is no merging of files if the file exists in both WARS; one simply overrides the other. You can configure the plugin to choose which one get's used; by default, it's the current project's file that wins. Also note, you can depend on more than just one war if you like.