there is 1 jsp page say view.jsp, so via spring it is rendered as view.htm, ok that is fine, but now i want to pass a list to it, and according to the given id from the list, the view.htm is change to view.htm/{id} but if i have 100 data, then do i need 100 jsp pages ?? how can i resolve this via spring
Share
You can add the list in the request and iterate through it in your
view.jsp.Like So (exaggerated example),
Now, you can use JSTL to iterate over it…in
view.jsp.Or, didn’t I understand you correctly?
Edit based on your question, you can still iterate through the data on the list and create an anchor tag that appends the data id to the
view.htm.something, like (in pseudo code)
${someData.description}
Where
someDatais the replaceddatasas put on first post. The anchor tag will be situated inside the<c:if>tag, hence if you have 100 items in an array, you’ll have 100 anchor tags.