Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
cskumar08@gmail.com - 16 Nov 2006 14:40 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.