File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes can GET but not POST w Tomcat and IIS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "can GET but not POST w Tomcat and IIS" Watch "can GET but not POST w Tomcat and IIS" New topic
Author

can GET but not POST w Tomcat and IIS

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12981
    
    5
I am trying to have Tomcat 4.1.18 handle servlets in an IIS 5 / Win2000 Server environment. By following the chapter in Professional Apache Tomcat (very clear) I can now see the Tomcat servlet examples - BUT only the examples that use GET, for examples that POST I get page not found!
By dealing directly with Tomcat on 8080 I can do GET and POST so it must be something about the connection.
Mystified
Bill
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

AFAIK,
There shouldn't be any problem in getting POST requests to work. Are you sure you are handling them in the doPost method of your servlet?
- Manish
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12981
    
    5
Yes - not only am I working with servlets that have been running on my site www.wbrogden.com on Tomcat for months, and on www.lanw.com for over a year (JRun 3.1), but I tested the Tomcat servlet samples in the /examples/ - the ones that use GET work fine. The cookies example works with the first GET that creates a form but when the response that uses POST fails with a page not found error. Furthermore, when talking directly to Tomcat on 8080, everything works.
I did a search on Google for something like "Tomcat on IIS can GET but not POST" and got a number of hits, but every one I followed up was never resolved, including one at Suns Java developer site!
I figure it has to be the configuration of the connector somehow but I can't find anything in IIS that would be related... Sure hope I don't have to do the "Its Microsoft - try reinstalling everything" dance!
Bill
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12981
    
    5
AHA - it looks like the problem was security settings used in the URLScan filter. I think this was installed by the IIS "lockdown" program. The settings were to allow only HEAD and GET requests. Wasted a lot of time on that one.
Bill
Betsy Allen
Greenhorn

Joined: Aug 19, 2005
Posts: 3
I'm having a similar problem. I can get dynamic and static pages using the connector, but I'm getting "page cannot be displayed" (after a long delay) on form pages. The tomcat console shows a timeout. I'm not familiar with the urlScan or the lockdown program. Can you summarize what you did to fix this problem?

Thanks in advance for your help.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12981
    
    5
As that was over 2 years ago and I no longer have direct access to the machine in question, I have to rely on my notes.
It appears that at the time there was a MS Security Tool Kit which included a IIS Lockdown Tool iislockd.exe (v2.1 of Oct 2002) -when run it fiddled with various IIS settings. A file "URLScan.ini" was installed or modified that had settings controlling the types of requests allowed. Apparently modifying settings in this file restored use of POST requests.
Bill
 
Consider Paul's rocket mass heater.
 
subject: can GET but not POST w Tomcat and IIS
 
It's not a secret anymore!