This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Can�t get JSP:s as HTML from Tomcat for IIS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "Can�t get JSP:s as HTML from Tomcat for IIS" Watch "Can�t get JSP:s as HTML from Tomcat for IIS" New topic

Can�t get JSP:s as HTML from Tomcat for IIS

Jonny Andersson
Ranch Hand

Joined: Sep 07, 2004
Posts: 87
I am as many others before trying to get Tomcat execute JSP/Sevlets for IIS using it�s JK2 connector. I have followed the description in Professional Apache Tomcat 5, chapter 13, carefully and the connection seems to work with one exception: The returned response for a call http://localhost/jsp-examples/dates/date.jsp is not served as HTML. Instead am I prompted to "Open with .." or Save the response to disk, as for an binary file requested from a web site.

Have anyone here have had the same problem before or has a clue to what the problem can be? In my view should the problem be that the virtual IIS directory for Tomcat (named /jakarta) is not configured to be allowed to execute executeables, only scripts. But that is not the answer because I have configured the directory to allow scripts and executeables wether it is necessary or not.

I am sure this is just something I have overlooked in the setup and I am sure other have had the same problem before, so I hope someone of you reading this is one of them : )

Truly agile Java application developer with Extreme Programming and high quality craftsmanship
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13001
If you do save the output, is it HTML or just the JSP script?
Jonny Andersson
Ranch Hand

Joined: Sep 07, 2004
Posts: 87
I tried that also and it is NOT HTML, if it is AJP13 source or just binary am I not quite sure about, I just cared about that it was not HTML. Then is the question of course why it is not HTML? But as I understand should the isapi_redirector2.dll file take care of that. And I can as I understand not configure it to explicitly talk HTML to IIS (and AJP/1.3 to Tomcat of course) because that is what it should always do! So something is strange here.

Because I actually can request JSP-files from /jsp-examples/* like /jsp-examples/dates/date.jsp, that is they are recognized, do I think everything should be configured correctly. But something in the chain of communication gets weird.

But I am very thankful for all suggetions like this from you because if they are not the direct answer they may at least help me get an idea on the answer myself.
Jonny Andersson
Ranch Hand

Joined: Sep 07, 2004
Posts: 87
I took another look and at least when I requested the JSP file did I got a binary response. A quick guess would be that I got the comiled JSP page returned. Or may it be the AJP/1.3 response that looks binary? Is it the ISAPI filter that then not translates that to HTML? I don�t know, I am still too new to Tomcat to know that : ) ... and the documentation for IIS on Tomcat is not too good.
I agree. Here's the link:
subject: Can�t get JSP:s as HTML from Tomcat for IIS
It's not a secret anymore!