473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem closing connection in HTTPServletResponse

Hi

I'm developing a webapp using servlets, which processes a HTTP Post
request and sent back MIME message (multipart/related - essentially
SOAP message with Attachments).

I'm constructing the MIME message manually (as I need to stream it to
the client) and writing it to OutputStream (few bytes everytime).

In the end, I close the OutputStream, but still client keeps on
waiting on the socket and it never get -1, while it reads from the
InputStream.

Thus server is not closing the socket even after closing the
OutputStream.

This problem occurs only when I set the content type header in servlet
response as multipart/related. The problem does not occur if I've to
send text/xml or multipart/mixed data.

Does anybody has any clue on it?

thanks & regards,
Naresh
Jul 17 '05 #1
1 3299
Naresh Agarwal wrote:
Hi

I'm developing a webapp using servlets, which processes a HTTP Post
request and sent back MIME message (multipart/related - essentially
SOAP message with Attachments).

I'm constructing the MIME message manually (as I need to stream it to
the client) and writing it to OutputStream (few bytes everytime).

In the end, I close the OutputStream, but still client keeps on
waiting on the socket and it never get -1, while it reads from the
InputStream.

Thus server is not closing the socket even after closing the
OutputStream.

This problem occurs only when I set the content type header in servlet
response as multipart/related. The problem does not occur if I've to
send text/xml or multipart/mixed data.

Does anybody has any clue on it?


I've seen this problem with certain application server and browser
combinations. For example, JRun 3.0's own admin screen had this problem
when accessed via Netscape.

Experiment with different app servers, browsers and even JVMs.

Ray
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: DaM | last post by:
Hi guys, I'm having this problem with my ASP.Net application: I was testing the whole site, and it seem to work fine. Fast and stable, but suddenly it stopped working and this error occurred:...
22
by: b_r | last post by:
Hi, I'm trying to make a simple operation (insert into DB) in VB 2005 and SQL Server. The code is as follows: Dim sConnectionString As String = _ "Data...
3
by: jynxxxed | last post by:
I've been reviewing some of the threads here and applying some of the advice and still getting the same error. 15:50:26,935 INFO java.sql.SQLException: Could not find stored procedure...
8
by: veerapureddy | last post by:
Hai everybody, I am facing problem with updating a record .actullay im getting some data from database(Access) and populating it on a html form.im trying to edit some texts and update, its not...
0
by: ponvijaya | last post by:
Hi all, I have one requirement in my project. I need to download a file from the server tot the client machine. And after downloading it , it should be redirected to another jsp file. The...
1
by: shrik | last post by:
hi everybody. I have following problem. There are two pages. index.jsp and main.jsp in my application Index.jsp contains logging interface in . It submits password and userid to loginform bean. ...
2
by: dmstn | last post by:
Hey! I've got a little problem. I have to make a web site for a university essay. I curently have to create a search engine. Users can enter a hotel name in a search bar and results have to appear in...
1
by: wnaveenkumar | last post by:
package com.trewport.orderprocess.action; import java.io.*; import java.sql.*; import java.util.*; import java.util.Date; import java.lang.Object; import javax.servlet.*; import...
1
by: creative1 | last post by:
When I test the application I get follwowing error: could not connect to smtp host: connection timeout error can someone please check if I have rigth settings? Where I am wrong here Is IP and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.