• 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

No output from Servlet

 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have run the xsl test through FireFox (deer park, actually) and the xsl translates the xml to html fine, no issues.

However, when invoking a servlet, an empty response is sent. It's probably a simple mistake. Can you spot the issue?


[ July 29, 2005: Message edited by: Garrett Smith ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not 100% familiar with Trax, but it looks like you are creating an HTML file as result of your transform. After all processing is done, you would need to redirect to that HTML file using response.sendRedirect(...). Make sure that the transform() method doesn't return until all processing is done.
[ July 30, 2005: Message edited by: Ulf Dittmer ]
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Method transform is void.


http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/Transformer.html
[ July 30, 2005: Message edited by: Garrett Smith ]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would certainly make a separate reference to that output stream so it can be close()ed to ensure that the output buffer is flushed. I have had several mystery "no output" problems that were solved that way.
Bill
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Changed, but same result (blank pg).

[ July 30, 2005: Message edited by: Garrett Smith ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't receive a response because none is generated - reread what I posted earlier.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I get 404. The file does not exist.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, I was stupid. I made it work now.

you were right ulf. Thanks.
reply
    Bookmark Topic Watch Topic
  • New Topic