Dynamic text in a JSP
i would like to know how to call one and the same JSP-file with different XML-content depending on which link I click. For example, if I click on link1 the JSP-page should load the content from data1.xml. After parsing the XML, a bean should be generated from the XML. However, I don't know if XML should be parsed on the client or on the server in this context.
My project is quite simple and only for learning purposes:
I have a start page with several cooking recipes. If I click on one of those recipes I get a detailed view of the recipe, which includes some text and an image. However, I don't want to create a new jsp-file for every recipe, because all recipes have the same layout. Instead, I want to use one and the same jsp-file for an arbitrary amount of recipes. The content of those recipes should be located in one or several XML-files.