• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No output from Servlet

 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Changed, but same result (blank pg).

[ July 30, 2005: Message edited by: Garrett Smith ]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Oh, I was stupid. I made it work now.

you were right ulf. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic