Mantis - Resin
Viewing Issue Advanced Details
2694 major always 05-26-08 03:41 05-20-10 17:20
closed 3.1.6  
none 4.0.7  
0002694: Aberrant behaviour of servlets within IIS7
We have set up Resin on a new Windows 2008 64bit server.
The following handler mappings have been set up in IIS...
Handler 1: "*.jsp" maps all verbs to "c:\inetpub\scripts\win64\isapi_srun.dll"
Handler 2: "servlet" maps all verbs to "c:\inetpub\scripts\win64\isapi_srun.dll"
Handler 3: "caucho-status" maps all verbs to "c:\inetpub\scripts\win64\isapi_srun.dll"
All other handlers are lower priority than these 3.

All jsp files work perfectly, however under some conditions caucho-status fails with 503 error, and servlets result in a 503 error.

Conditions that cause servlets to fail...

Make any kind of change to IIS, i.e. add a mime type or add a virtual directory of any name, and caucho-status and servlets work. But when the application pool is recycled, the 503 errors start appearing... and yet jsp files continue to operate normally. When you make an arbitrary change to IIS again (as per above) caucho-status and servlets start working again.

Incidentally, we have a servlet that is invoked with extra path information: e.g. "http://domain/servlet/ServletName/key-rich-path-info/filename.jsp" [^]
This servlet gets picked up by our "*.jsp" handler and is unaffected by the above mentioned problem.

Has *anyone* else experienced this strange behaviour or have any valuable advice for us??

05-27-08 18:09   
Further to this, I have discovered that IIS7 is stomping on extensionless file requests.


Requesting "http://domain/servlet/ServletName" [^] fails.

Requesting "http://domain/servlet/ServletName/blah.jsp" [^] succeeds.

I can work around this by tagging fake filenames on at the end of my servlets, however it is a rather ineligant solution and doesn't fix the "caucho-status" problem.
05-27-08 21:18   
I managed to reproduce this problem on my Vista & IIS7 workstation at home and found the solution!

If you go into IIS, click into "handler mappings", and "edit feature permissions" and "tick 'execute'", then the errors disappear and servlets can then be requested without extraneous filenames and extensions.

I have yet to test this on our live Windows 2008 server, but I'm sure it will work.

This process would have been made a LOT easier if Caucho had published instructions on configuring resin to run on IIS7! C'mon guys, keep up with the times :-P :-P :-P LOL

Also note, only one handler mapping is required:
"*.jsp" which maps all verbs to "c:\inetpub\scripts\win64\isapi_srun.dll" (script type)