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

Discussion in 'Java' started by cskumar08@gmail.com, Nov 16, 2006.

  1. Guest

    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
    , Nov 16, 2006
    #1
    1. Advertising

  2. 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

    wrote:

    > 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


    --
    __________________________________________________________
    insOMnia - We never sleep...
    http://www.insomnia-hq.de
    Jan =?ISO-8859-1?Q?Thom=E4?=, Nov 16, 2006
    #2
    1. Advertising

  3. wrote:
    > 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
    Manish Pandit, Nov 16, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brahmam
    Replies:
    1
    Views:
    363
    Scott M.
    Mar 28, 2006
  2. sridhar kumar ch
    Replies:
    1
    Views:
    8,544
  3. sridhar kumar ch
    Replies:
    0
    Views:
    775
    sridhar kumar ch
    Jun 28, 2006
  4. yogesh
    Replies:
    1
    Views:
    349
    Victor Bazarov
    Mar 14, 2007
  5. Mike

    Setting default vales

    Mike, Mar 7, 2007, in forum: Ruby
    Replies:
    6
    Views:
    108
    Brian Candler
    Mar 8, 2007
Loading...

Share This Page