When creating JSP pages one thing that I'd often like is the ability to do something like this:
<jsp:include page="fancystoryrenderer.jsp" value="${aStoryObjectInMyModel}/>
...
fancystoryrenderer.jsp
<div id="fancymainbody">
...
${theStory.title}
...
</div>
The main important characteristics of this is that I can reuse the same component on the same JSP page in different places without having to copy paste the component and give the story variables different names, notice that the story is called "theStory" in the JSP and not "aStoryObjectInMyModel", the linkage between our model has been broken by the view, which is a good thing in this case. Also, I know you can pass a parameter to the JSP view, but I DO NOT WANT to grab attributes from the request object at all, I want to be able to use the parameters from expression language.
How do you do this?
I am using Spring-MVC and JSP, please no added frameworks, I'm interested in getting this to work using only the web stack I currently have.