Servlets and XML, XSLT

Discussions

XML & Web services: Servlets and XML, XSLT

  1. Servlets and XML, XSLT (3 messages)

    I want to use Java and XML to do the following:

    I have 2 web pages that display some similar content.

    The first page should display one column (say x) from the database table and the second page should display x column and y and z columns.

    How do I do this? Shld I just write in the servlet instead of PrintWriter pw = response.getWriter();
    response.setContentType("text/html");

    PrintWriter pw = response.getWriter();
    response.setContentType("text/xml");

    If I directly include the xslt file like it is normally done when we create a xml page how will it accept diffeent xslt for different pages? if the xslt file is placed on server will it accept the different xslt for both pages?

    Threaded Messages (3)

  2. Servlets and XML, XSLT[ Go to top ]


    This article has code related to your question:

    http://www.javaworld.com/javaworld/jw-06-2000/jw-0630-xsl.html
  3. Servlets and XML, XSLT[ Go to top ]

    Hey thanks for the link. I will check it out.
  4. Servlets and XML, XSLT[ Go to top ]

    Be sure to call
    response.setContentType("text/xml");
    before you call
    PrintWriter pw = response.getWriter();