Hi Guys,
I am new to XML, I want to send attributes from XML to JSP. Can any one
send code example and can any one tell me how to pass vales from xml
file to jsp file...
Regards,
Sridhar
Jan Thomä - 16 Nov 2006 15:56 GMT
Hi,
i sense a slight misunderstanding of concepts here. XML is not a programming
language (well, at least not in my definition of a programming language),
it is more like a document description language. Therefore there is no way
to "pass information" from XML to a JSP via a magic XML command. You will
need some XML parser (Xerces for instance), which you can use to parse the
XML file inside your JSP page and then grab the using the parser. Here is a
tutorial on that: http://totheriver.com/learn/xml/xmltutorial.html
Best regards,
Jan
> Hi Guys,
>
[quoted text clipped - 4 lines]
> Regards,
> Sridhar

Signature
__________________________________________________________
insOMnia - We never sleep...
http://www.insomnia-hq.de
Manish Pandit - 16 Nov 2006 18:01 GMT
> Hi Guys,
>
[quoted text clipped - 4 lines]
> Regards,
> Sridhar
Have a controller or a utility class parse the XML, set the values you
want to pass over to the JSP as request/session attributes and forward
to that JSP. In the JSP you can either use scriptlets or EL to access
those attributes.
-cheers,
Manish