aspose file tools*
The moose likes XML and Related Technologies and the fly likes No output from Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "No output from Servlet" Watch "No output from Servlet" New topic
Author

No output from Servlet

Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
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 ]

comp.lang.javascript FAQ: http://jibbering.com/faq/
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
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 ]

Ping & DNS - my free Android networking tools app
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
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

Joined: Mar 22, 2000
Posts: 12825
    
    5
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

Joined: Jun 27, 2002
Posts: 401
Changed, but same result (blank pg).

[ July 30, 2005: Message edited by: Garrett Smith ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
You don't receive a response because none is generated - reread what I posted earlier.
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401

I get 404. The file does not exist.
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
Oh, I was stupid. I made it work now.

you were right ulf. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No output from Servlet