• Post Reply Bookmark Topic Watch Topic
  • New Topic

can GET but not POST w Tomcat and IIS  RSS feed

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!