I am a newbie to JSP and frankly I don't know how to do much with it. I recently completed a semester learning Java but we didn't cover servlets, beans, or JSP.
I need some simple instructions to perform a simple task in a JSP page.
I am being supplied an XML document and I need to generate an HTML report from the data contained in it.
My question is how do I get the data from the XML doc into my JSP page?
I have been trying to find a good resource but everything seems to point to custom tag libraries to JSTL and other things that I am completely unfamiliar with. This seems like it would be a simple process of pointing my JSP to the XML doc somehow and using the XML field tags as variables.
second, once I have figured out how to all that, how do I get it to pull the info multiple times to create a table of information.
I hope this is simple and I am not asking a lot of anyone. I have a week to figure this out, code it and test it. Below is a copy of the sample XML I was provided:
thanks Dan [ May 24, 2004: Message edited by: Bear Bibeault ]
Posting only a snippet of the XML would have been enough too, seeing as the data repeats itself [Bear: done]
As Ali suggests, look at XSLT to transform the data into HTML. If you want to do that inside JSP, also look at the JSTL XML tags, which include XSLT support. [ May 24, 2004: Message edited by: Bear Bibeault ]
Well, the task you have is certainly simple, if you have experience in the various Java XML APIs and JSPs. Given what you described as your level of Java understanding, I'd say you are looking at a fairly tough task overall.
The easiest thing I can see you for you to do, is get the JSTL tag libaries and look at the XML related tags.