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?
-
Servlets and XML, XSLT (3 messages)
- Posted by: priyanka shah
- Posted on: August 20 2002 14:52 EDT
Threaded Messages (3)
- Servlets and XML, XSLT by Bhagvan K on August 21 2002 02:23 EDT
- Servlets and XML, XSLT by priyanka shah on August 21 2002 11:08 EDT
- Servlets and XML, XSLT by Todd Murray on August 22 2002 16:42 EDT
-
Servlets and XML, XSLT[ Go to top ]
- Posted by: Bhagvan K
- Posted on: August 21 2002 02:23 EDT
- in response to priyanka shah
This article has code related to your question:
http://www.javaworld.com/javaworld/jw-06-2000/jw-0630-xsl.html -
Servlets and XML, XSLT[ Go to top ]
- Posted by: priyanka shah
- Posted on: August 21 2002 11:08 EDT
- in response to Bhagvan K
Hey thanks for the link. I will check it out. -
Servlets and XML, XSLT[ Go to top ]
- Posted by: Todd Murray
- Posted on: August 22 2002 16:42 EDT
- in response to priyanka shah
Be sure to call
response.setContentType("text/xml");
before you call
PrintWriter pw = response.getWriter();