I use the <jsp:include page="..."> function for a lot of my pages but the one big downfall I keep coming across if that if you put parameters in the page to be included, it seems as though you can't make them optional. Therefore if you have a bunch of usages already of a jsp component and you want to add a parameter to it, you have to find all the places it is included and add the new parameter.
Is there a way to make it so that these parameters are either not required or default to some value if not mentioned in the include statement?
Here's an example:
<div class="container-fluid">
<div class="row">
<div class="col-sm-8 col-12 offset-sm-2 slider-text">
<div class="slider-text-inner text-center">
<h1><%=request.getParameter("h1")%></h1>
<h2><%=request.getParameter("h2")%></h2>
</div>
</div>
</div>
</div>
<jsp:include page="../../Components/smallHero.jsp">
<jsp:param name="h1" value="Some Text Here"/>
<jsp:param name="h2" value=""/>
</jsp:include>