IIS-Tomcat Post Data reading problem?

Hi All ,

I have a web-application which works fine with

IIS-JRun . Now when I run it on IIS-Tomcat

it gives an error. It seems that Tomcat is unable to

read the Post Data. My code is :

InputStream raw = req.getInputStream() ;

byte[] data = new byte[m_ContentLength];

int current_bytes_read = 0;

int total_bytes_read= 0;

InputStream buff = new BufferedInputStream(raw);

// the while loop where I read the post data

while (total_bytes_read < m_ContentLength)

{

current_bytes_read = buff.read(data, total_bytes_read, data.length - total_bytes_read);

if (current_bytes_read == -1)

{

System.out.println(">>**Breaking the loop : current_bytes_read :"+current_bytes_read);

break;

}// eo if

total_bytes_read += current_bytes_read;

}// eo while

The method buff.read() returns -1. So the loop breaks.

The same code snippet works fine with JRun.

Thanks in advance.

Sujoy

[1055 byte] By [sujoydc] at [2007-9-26 3:20:09]
# 1

Hi All,

I have configured Tomcat 3.2 for IIS 4.0 on Win 2000 App Server. The virtual directory is registered, the green arrow is displayed. All the registry entries are perfect (cross checked everything).

But when i change the port of Tomcat from 8080 to 80, im unable to start tomcat.

Also when the URL specified in my asp page to redirect to a jsp page is http://localhost/examples/jsp/index.html this doesn't work it gives a 404 error.. (i've checked the uriworkermap.properties & wrapper.properties.. its fine)

but if i specify the port number as 8080 it works..

In IIS I have an ASP page on some event i want the isapi redirector to recognize the request and redirect it to my JSP page (simply speaking call a jsp page from an asp page).

can u help me configure Tomcat for IIS by which i dont have to specify the port number for my jsp/servlet requests ?

thanx,

Shanker

> Hi All ,

> I have a web-application which works fine with

> IIS-JRun . Now when I run it on IIS-Tomcat

> it gives an error. It seems that Tomcat is unable to

>

> read the Post Data. My code is :

>

> InputStream raw = req.getInputStream() ;

>

> byte[] data = new byte[m_ContentLength];

> int current_bytes_read = 0;

> int total_bytes_read= 0;

> InputStream buff = new BufferedInputStream(raw);

>

> // the while loop where I read the post data

> while (total_bytes_read < m_ContentLength)

> {

> current_bytes_read = buff.read(data,

> a, total_bytes_read, data.length -

> total_bytes_read);

>

> if (current_bytes_read == -1)

> {

> System.out.println(">>**Breaking the loop :

> current_bytes_read :"+current_bytes_read);

> break;

> }// eo if

>

> total_bytes_read += current_bytes_read;

>

> }// eo while

>

>

> The method buff.read() returns -1. So the loop breaks.

>

> The same code snippet works fine with JRun.

>

> Thanks in advance.

>

> Sujoy

>

>

ShankerM at 2007-6-29 11:35:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...