File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Servlet with Vista issue. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Servlet with Vista issue." Watch "Servlet with Vista issue." New topic

Servlet with Vista issue.

Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Hey All,

I have run into a very very puzzling scenario. A problem which is only evident on Vista clients. Now before anyone shouts at me saying its not a servlet problem, perhaps not but perhaps I need to do something to my servlet to get it working on vista...

The problem : I have a servlet which returns configuration information in the form of encoded text. It can either be downloaded by clicking on a link or via a desktop application.

The desktop application download wasnt working so this was when I started to investigate.

Now I do not have any problems on XP, in either firefox, I.E 6 or I.E. 7, And neither do I have a problem on Vista I.E. if I download via HTTPS, BUT when I call the URL via ordinary http I get the weirdest behaviour..

The download begins ok, It reads the headers fine as it tells me the file size and gives me the save as prompt as expected.. Then when it begins to download.. (bear in mind I'm using dialup) the first 6 or 7k bytes come down ok.. then it gets slower and slower.. until eventually its 0 bytes/sec

Can anyone suggest what may be the cause of this ? I've fiddled with the servlet, fiddled with security settings on I.E. but nothing seems to make a difference. I do find it odd it works fine via https, but http has the problem.

Rgds, Dave

Regards, Dave Brown
SCJP 6 - [url][/url] - Check out Grails Forum
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

It is unlikely that you will find a response for this question because 99% of the world is still not using Vista (I can tell why ). Have you tried the firefox + Vista combination (Just to make sure that the problem is not because of IE7 + Vista) ?

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Hi, Yeah I tried firefox. No luck, same issue. It must be something lower level, If I find the answer, I'll post it on here.
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Further to my tests... When running my servlet locally on my laptop and connecting from the 2nd laptop(vista) and making the same request, it works.

So to add to the complication, the problem is only occuring when i'm making the request to my server. (linux)

So maybe the issue is apache or modjk -> tomcat... This is really hard to track down, perhaps some kind of packet sniffer could help point me in the right direction..
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
ok folks, sorry for filing this in servlets. But I can confirm, if anyone was worried that the issue is NOT a vista/servlet issue.

Its something to do with Mod-JK.

I grabbed the result of my servlet and put it directly in a jsp. Same problem.
I took the result and put it in a html file outside of tomcat. It worked.

I called the jsp, directly on port 8080 bypassing apache and modJK, It worked.

So the only time I get the problem is when calling the page via ModJK.

I'm getting closer to nailing this, If I do find the result I'll add a final reply to this post, people may benefit from it.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Yes, please do report back with what you find.
I'm going to move this thread to our Apache Tomcat forum since you now know that it has something to do with the connector.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: Servlet with Vista issue.
It's not a secret anymore!