• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transforming Servlet Response

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to transform a response from a servlet from XML ( the reply from the servlet display XML on my web browser ) to HTML using XSLT. How do I capture the response from a servlet to transform it? I am relatively new to servlet so forgive ignorance.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most elegant solution is to use a filter that processes the outcome of the service method of you servlet, and transforms the XML to HTML. You could also build a simple XSLTHelper that you invoke at the end of your service method. There are numerous examples on both filters and how to do an XSL transformation from a servlet (do a Google search, or check the tutorials on java.sun.com)
 
reply
    Bookmark Topic Watch Topic
  • New Topic