aspose file tools*
The moose likes Servlets and the fly likes Http response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Http response" Watch "Http response" New topic
Author

Http response

shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
Hi,
I have a server side program where i generate an XML file. Its a time consuming process. So i need to output the XML as and when it is growing in size to the client. So, I created a thread and sending the XML as response which is varying. The XML is bound to the session. Now, my problem is, I have to overwrite the response everytime, but its getting appended to already existing response and so the browser gives an error saying that two xml elements should not be there. I hope i am clear here. What is the solution for this??
========
shankar
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
You are going to have to prevent the XML file from being modified while you are sending a response. If the process that modifies the XML can't be halted, then you will have to somehow grab a copy and send the copy.
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
Hi,
I am able to send the response but my problem is when i send it for a second time(I may have to send the response at equal intervals of a fixed time), it appends to the already existing response in the browser window and this gives an error because I am trying to append an xml to an xml .....as mentioned in my previous post.
========
shankar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Http response