One way of doing this is have the HTML/XML generation logic in a separate
jsp file. Then through JSP, u can decide to include the corresponding file
depending upon the request parameter. u can use <jsp:include> tag for
including this file. The included jsp gets executed at the request time.
I hope this helps u.
Meghana.
On Wed, 17 Jan 2001, S Ramakrishnan wrote:
> Hi -
>
> I need the JSP pages to generate HTML for real-time
> viewing and XML for report generation. In either
> case, the data source is the same.
>
> Is it possible to have the JSP page generate
> an XML document or an HTML document
> based on the value of a request parameter?
>
> Or is a more elegant solution to have the JSP
> page generate only XML and use an XSLT based
> XML->HTML converter?
>
> Thanks,
>
> Rk
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
******************************************************************************
We have no right to ask when sorrow comes, "Why did this happen to me?"
Unless we ask the same question for every moment of happiness that comes our
way.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets