tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat 7, isapi_redirect, IIS 7 - blank page
Date Fri, 22 Jul 2011 12:33:28 GMT
Douglas McGregor wrote:
> Sorry for the late reply.  I took a break from this for a day or so. 
> 
> I can confirm that Tomcat handles .jsp pages correctly -
> http://www.douglasmcgregor.co.uk:8080/examples works fine.
> However, when I try http://www.douglasmcgregor.co.uk:8080/HelloWorld.jsp I
> get HTTP Status 404 from Tomcat.

1) Where is exactly located that "HelloWorld.jsp", on disk ?
2) paste your Tomcat server.xml file here (minus the comments, please, and minus any 
passwords)

> This is because the page I am trying to execute is not in Tomcat itself but
> in E:\douglasmcgregor.co.uk, which is
> served from IIS.  I know it's set up correctly because it works on my
> development server but not on my production
> server.  And I can confirm that the server.xml file has the HTTP Connector
> set to listen on port 8080. 
> 
> There is a new problem - when I try to access
> http://www.douglasmcgregor.co.uk/examples/ it prompts me to download a file
> - 
> not found the solution to that yet.  But
> http://www.douglasmcgregor.co.uk/HelloWorld.jsp is persistantly showing a
> blank page.

If Tomcat cannot find it (error 404 above), then IIS+Tomcat will not find it either.
Why you get a blank page instead of a 404 error, is another matter.


> 
> Thanks
> 
> -----Original Message-----
> From: André Warnier [mailto:aw@ice-sa.com] 
> Sent: 20 July 2011 15:50
> To: Tomcat Users List
> Subject: Re: Tomcat 7, isapi_redirect, IIS 7 - blank page
> 
> Hi.
> 
> Let's see how quickly we can solve this..
> (Considering that you've already spent 2 months on it, getting a really good
> percentage improvement should not be that hard).
> 
> First, let's verify if Tomcat, on its own, handles JSP pages correctly.
> For that we will bypass IIS, and go directly from the browser to Tomcat.
> I will presume that both IIS and Tomcat are on the same machine.
> And that Tomcat, in its "server.xml" file, has a HTTP Connector set to
> listen on port 8080, and that this port 8080 is not blocked on your Windows
> host by something.
> 
> Given all the above, what happens if you call one of these JSP's from your
> browser, using the normal URL, but just appending ":8080" to the hostname in
> the URL ?
> For example, if what you tried until now was :
> http://www.douglasmcgregor.co.uk/something.jsp
> then try
> http://www.douglasmcgregor.co.uk:8080/something.jsp
> (adapt as necessary for the real test URL)
> 
> What is the result ?
> 
> 
> 
> Douglas McGregor wrote:
>> Hi there,
>>  
>> I'm getting really desperate with this - I've been at it for about a 
>> couple of months now and still no further forward.  The strange thing 
>> is that this works absolutely fine in IIS 7.5 with Tomcat 7 on my 
>> laptop which runs Windows 7, but is persistantly throwing a blank page 
>> on IIS 7 with Windows Server 2008 - it gives a blank page when I add 
>> the Handler Mapping in IIS, but just shows source code when I delete 
>> the Handler Mapping.
> 
> That means that you have done at least one thing which you should not have
> done : allow IIS to access these pages directly, without going through
> Tomcat.
> That is a security issue, but it can be corrected later.
> 
>> I'm stumped with this.  I'll outline what I've done below - please 
>> note that I've followed the documentation on the official Tomcat 
>> website to the letter
>> -
>> this is the HowTo documentation for connecting Tomcat to IIS.
>>  
>>  
>>
>> 1.	Installed Tomcat 7.0.18 in E:\Tomcat
>> 2.	Created a directory named isapi in E:\Tomcat - so, E:\Tomcat\isapi
>> 3.	Created an isapi_redirect.properties file in the same directory and
>> modified the paths
>> 4.	Created workers.properties and uriworkermap.properties in
>> E:\Tomcat\conf
>> 5.	Added content to and edited workers.properties and
>> uriworkermap.properties as required
>> 6.	Stop and Start the Tomcat Service
>>
>> In the IIS Manager:
>>  
>>
>> 1.	Created a virtual directory called "jakarta" (without the quotes)
>> pointing to E:\Tomcat\isapi
>> 2.	In IIS Home (in my case this is WEB-SERVER Home), clicked on ISAPI
>> and CGI Restrictions, clicked add - ISAPI Or CGI Path:
>> E:\Tomcat\isapi\isapi_redirect.dll; Description: Tomcat
>> 3.	Clicked on my website, went to ISAPI Filters, clicked add - Filter
>> name: Tomcat; Executable: E:\Tomcat\isapi\isapi_redirect.dll
>> 4.	Handler Mappings - Add Module Mapping - Request Path = *.jsp; Module
>> = IsapiModule; Executable = E:\Tomcat\isapi\isapi_redirect.dll; Name = 
>> Tomcat; Request Restrictions > Access > Execute
>> 5.	Restart IIS
>>
>>  
>> isapi_redirect.properties
>>  
>> # Configuration file for the Jakarta ISAPI Redirector
>>  
>> # The path to the ISAPI Redirector Extension, relative to the website 
>> # This must be in a virtual directory with execute privileges 
>> extension_uri=/jakarta/isapi_redirect.dll
>>  
>> # Full path to the log file for the ISAPI Redirector 
>> log_file=E:\Tomcat\logs\isapi.log
>>  
>> # Log level (debug, info, warn, error or trace) log_level=debug
>>  
>> # Full path to the workers.properties file 
>> worker_file=E:\Tomcat\conf\workers.properties
>>  
>> # Full path to the uriworkermap.properties file 
>> worker_mount_file=E:\Tomcat\conf\uriworkermap.properties
>>  
>>  
>> workers.properties
>>  
>> # An entry that lists all the workers defined
>> worker.list=worker1
>> # Entries that define the host and port associated with each of these 
>> workers worker.worker1.host=www.douglasmcgregor.co.uk
>> worker.worker1.port=8009
>> worker.worker1.type=ajp13
>> worker.worker1.connection_pool_timeout=600
>>  
>> uriworkermap.properties
>>  
>> #example uriworkermap.properties fragment
>> /examples/*=worker1
>> .jsp=worker1
>>  
>>  
>>  
>> The "/examples/" work perfectly, but like I said .jsp pages on IIS 
>> give a blank page.  I should say I've Googled for days and hours and 
>> not found anything that fixes this.
>> I've asked on the official IIS forum, but they don't seem to be able 
>> to help.  I really hope someone here can help me with this, I'm close 
>> to giving up.
>>  
>> Thanks
>>  
>> Douglas
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message