can any one tell me how to pass vales from xml file to jsp file

C

cskumar08

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
 
J

Jan =?ISO-8859-1?Q?Thom=E4?=

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
 
M

Manish Pandit

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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top