You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Douglas McGregor <du...@douglasmcgregor.co.uk> on 2011/07/20 14:30:29 UTC

Tomcat 7, isapi_redirect, IIS 7 - blank page

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.
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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Ian Porter <ia...@codingfriends.com>.
Hi,

I am not sure if this helps, but I was having problems with the ISAPI
redirect with IIS, but with using the Application Request Routing part
of IIS (have to install it) then got around using the ISAPI :)

HTH
Ian


2011/7/21 Markus Schönhaber <to...@list-post.mks-mail.de>:
> 20.07.2011 23:02, Falzone.Matthew:
>
>> Didn't mean to, I sent it too soon so I started a new thread.  Was there an issue with starting a new one?
>
> Yes. The issue was: you didn't start a new thread.
> If you push the "reply" button of your mail client when viewing some
> message, it will create a reply to this message. Changing the subject
> line doesn't change the fact that it's still a reply.
>
> To start a new thread/topic, create a *new* message to
> <us...@tomcat.apache.org>.
>
> --
> Regards
>  mks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>



-- 
Kind regards
Ian Porter

www: www.codingfriends.com

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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Markus Schönhaber <to...@list-post.mks-mail.de>.
20.07.2011 23:02, Falzone.Matthew:

> Didn't mean to, I sent it too soon so I started a new thread.  Was there an issue with starting a new one?

Yes. The issue was: you didn't start a new thread.
If you push the "reply" button of your mail client when viewing some
message, it will create a reply to this message. Changing the subject
line doesn't change the fact that it's still a reply.

To start a new thread/topic, create a *new* message to
<us...@tomcat.apache.org>.

-- 
Regards
  mks

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


RE: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by "Falzone.Matthew" <Ma...@IGT.com>.
Didn't mean to, I sent it too soon so I started a new thread.  Was there an issue with starting a new one?

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Wednesday, July 20, 2011 1:31 PM
To: Tomcat Users List
Subject: Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

On 20/07/2011 21:28, Falzone.Matthew wrote:
> Is there no installer for win 7 64bit?  I just see the binaries.  There is reference to it all over the docs, but no installer to be found.

Please don't hijack threads.

Mark



---------------------------------------------------------------------
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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Mark Thomas <ma...@apache.org>.
On 20/07/2011 21:28, Falzone.Matthew wrote:
> Is there no installer for win 7 64bit?  I just see the binaries.  There is reference to it all over the docs, but no installer to be found.

Please don't hijack threads.

Mark



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


RE: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by "Falzone.Matthew" <Ma...@IGT.com>.
Is there no installer for win 7 64bit?  I just see the binaries.  There is reference to it all over the docs, but no installer to be found.

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: Wednesday, July 20, 2011 1:26 PM
To: Tomcat Users List
Subject: Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Leo Donahue - PLANDEVX wrote:
> ________________________________________
> From: André Warnier [aw@ice-sa.com]
> Subject: Re: Tomcat 7, isapi_redirect, IIS 7 - blank page
> 
> Leo Donahue - PLANDEVX wrote:
> ...
>> Don't you have to set and allow a web service extension in IIS for the Jakarta?
>>
> But the OP says 'The "/examples/" work perfectly', ...
> 
> *************************
> Yes, but I don't think we've seen any proof of that.  Servlets work but JSP's don't in his situation?
> 
It is to verify this, that I previously asked the OP to try the same JSP URL's to Tomcat 
directly, instead of going through IIS.

My currently unsubstantiated theory is that on his system :
- JSPs do not work at all. Calling up one results in an error at the Tomcat level (for 
whatever reason, such as what Mladen hinted at : permissions e.g.)
- but the configuration is such that IIS's and Tomcat's "document roots" are the same.
   That is a mistake, but it has the consequences that :
   - when the IIS-Tomcat proxying is not active (turned off), IIS can access these URLs 
directly.  Hence the fact that then, accessing a JSP returns the page in source form.
(And the OP did not explicitly say what happens in that case with the /examples/ servlets).
   - when the IIS-Tomcat proxying is active, requests for JSP's are forwarded to Tomcat 
(instead of being served directly by IIS).  In that case, an error occurs at the
Tomcat level, and is being returned via IIS.  But something (at the Tomcat or IIS
or browser level) causes this to appear as a blank page in the browser.

Of course, this theory is based on incomplete information, but it seems to fit the facts 
which we know so far.
Now if the OP next told us that JSPs work when called up from Tomcat directly, or if he 
told us that the /examples/ also work when the redirection is not active, then the theory 
would need some serious revision.

A.

---------------------------------------------------------------------
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


Re: Win7 64 bit installer

Posted by Mark Thomas <ma...@apache.org>.
On 20/07/2011 21:29, Falzone.Matthew wrote:
> Is there no installer for win 7 64bit?  I just see the binaries.  There is reference to it all over the docs, but no installer to be found.

Again, please do not hijack threads.

Mark



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


Win7 64 bit installer

Posted by "Falzone.Matthew" <Ma...@IGT.com>.
Is there no installer for win 7 64bit?  I just see the binaries.  There is reference to it all over the docs, but no installer to be found.

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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by André Warnier <aw...@ice-sa.com>.
Leo Donahue - PLANDEVX wrote:
> ________________________________________
> From: André Warnier [aw@ice-sa.com]
> Subject: Re: Tomcat 7, isapi_redirect, IIS 7 - blank page
> 
> Leo Donahue - PLANDEVX wrote:
> ...
>> Don't you have to set and allow a web service extension in IIS for the Jakarta?
>>
> But the OP says 'The "/examples/" work perfectly', ...
> 
> *************************
> Yes, but I don't think we've seen any proof of that.  Servlets work but JSP's don't in his situation?
> 
It is to verify this, that I previously asked the OP to try the same JSP URL's to Tomcat 
directly, instead of going through IIS.

My currently unsubstantiated theory is that on his system :
- JSPs do not work at all. Calling up one results in an error at the Tomcat level (for 
whatever reason, such as what Mladen hinted at : permissions e.g.)
- but the configuration is such that IIS's and Tomcat's "document roots" are the same.
   That is a mistake, but it has the consequences that :
   - when the IIS-Tomcat proxying is not active (turned off), IIS can access these URLs 
directly.  Hence the fact that then, accessing a JSP returns the page in source form.
(And the OP did not explicitly say what happens in that case with the /examples/ servlets).
   - when the IIS-Tomcat proxying is active, requests for JSP's are forwarded to Tomcat 
(instead of being served directly by IIS).  In that case, an error occurs at the
Tomcat level, and is being returned via IIS.  But something (at the Tomcat or IIS
or browser level) causes this to appear as a blank page in the browser.

Of course, this theory is based on incomplete information, but it seems to fit the facts 
which we know so far.
Now if the OP next told us that JSPs work when called up from Tomcat directly, or if he 
told us that the /examples/ also work when the redirection is not active, then the theory 
would need some serious revision.

A.

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


RE: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Leo Donahue - PLANDEVX <Le...@mail.maricopa.gov>.
________________________________________
From: André Warnier [aw@ice-sa.com]
Subject: Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Leo Donahue - PLANDEVX wrote:
...
>
> Don't you have to set and allow a web service extension in IIS for the Jakarta?
>
But the OP says 'The "/examples/" work perfectly', ...

*************************
Yes, but I don't think we've seen any proof of that.  Servlets work but JSP's don't in his situation?

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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by André Warnier <aw...@ice-sa.com>.
Leo Donahue - PLANDEVX wrote:
...
> 
> Don't you have to set and allow a web service extension in IIS for the Jakarta?
> 
But the OP says 'The "/examples/" work perfectly', which seems to indicate that the 
requests are being passed to Tomcat.
Unless of course IIS is bypassing Tomcat, which with this configuration appears possible.

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


RE: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Leo Donahue - PLANDEVX <Le...@mail.maricopa.gov>.
_______________________________________
From: Douglas McGregor [dug@douglasmcgregor.co.uk]
Subject: Tomcat 7, isapi_redirect, IIS 7 - blank page

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.
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

**************************

Don't you have to set and allow a web service extension in IIS for the Jakarta?

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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Mladen Turk <mt...@apache.org>.
On 07/22/2011 12:42 PM, 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.
> 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.

1. Nothing is served form the IIS!
    IIS just redirects the requests to Tomcat
2. If it cannot be served by Tomcat it cannot be served by IIS.


Regards
-- 
^TM

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


RE: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Douglas McGregor <du...@douglasmcgregor.co.uk>.
I spotted that myself and fixed it, but it's still the same result.

 

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: 22 July 2011 12:27
To: Tomcat Users List
Subject: Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Hi.

No time now to look at it in detail, but I spotted something in your earlier
post :

#example uriworkermap.properties fragment  > /examples/*=worker1  >
.jsp=worker1  > It should be :

*.jsp=worker1

according to :
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html
section "URI patterns"

Try again with that and report back.



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.
> 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.

You need to install a pugin in the browser, to show *exactly* the content of
the server to browser response (including HTTP headers).
If you use IE, try Fiddler2
If you use Firefox, try HttpFox or similar

Then start the plugin, make your request to the server, and look in the
plugin window to see what exactly the server responds.

   But
> http://www.douglasmcgregor.co.uk/HelloWorld.jsp is persistantly 
> showing a blank page.
> 
> 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



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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by André Warnier <aw...@ice-sa.com>.
Hi.

No time now to look at it in detail, but I spotted something in your earlier post :

#example uriworkermap.properties fragment
 > /examples/*=worker1
 > .jsp=worker1
 >
It should be :

*.jsp=worker1

according to :
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html
section "URI patterns"

Try again with that and report back.



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.
> 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.

You need to install a pugin in the browser, to show *exactly* the content of the server to 
browser response (including HTTP headers).
If you use IE, try Fiddler2
If you use Firefox, try HttpFox or similar

Then start the plugin, make your request to the server, and look in the plugin window to 
see what exactly the server responds.

   But
> http://www.douglasmcgregor.co.uk/HelloWorld.jsp is persistantly showing a
> blank page.
> 
> 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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Mladen Turk <mt...@apache.org>.
On 07/22/2011 08:18 PM, Douglas McGregor wrote:
> Just wanted to share the good news.
> I've finally got it working!!
>
>
> It's such a relief!
>

I bet it is, after so many months ;)


Cheers
-- 
^TM

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


RE: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Douglas McGregor <du...@douglasmcgregor.co.uk>.
Just wanted to share the good news.
I've finally got it working!!

What worked was adding a virtual host to server.xml and adding a context
path like so:

<Host name="www.douglasmcgregor.co.uk" appBase="webapps" unpackWARs="true"
autoDeploy="true">
		<Alias>douglasmcgregor.co.uk</Alias>
		<Context path="" docBase="E:\douglasmcgregor.co.uk"
debug="0" reloadable="true" />
</Host> 

It's such a relief!

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: 22 July 2011 13:33
To: Tomcat Users List
Subject: Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

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



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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by André Warnier <aw...@ice-sa.com>.
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


RE: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Douglas McGregor <du...@douglasmcgregor.co.uk>.
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.
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.

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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by André Warnier <aw...@ice-sa.com>.
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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Mladen Turk <mt...@apache.org>.
On 07/20/2011 02:30 PM, 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.

You could have finish the MCSE exams by that time.
Sorry, couldn't resist :)

> 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.

Don't think that's that strange.
I presume you are talking about 2K8R2 ( ~= Win7)
Pure 2008 should be something like Windows Vista, which you should
have put into the Recycle bin a long time ago.

Nevertheless, the 99.9% percent of the problems are related
to that weird windows permission settings and ACL's.


Regards
-- 
^TM

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


Re: Tomcat 7, isapi_redirect, IIS 7 - blank page

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/7/20 Douglas McGregor <du...@douglasmcgregor.co.uk>:
> 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

1) Do you have ROOT webapp in your Tomcat? That is a known feature of
Tomcat that it is unable to display those usual green error pages if
request is not mapped to a webapp and replies with empty page.

2) What version of isapi_redirect.dll; do you use? Do you use correct
version of dll? (64-bit for 64-bit version of IIS?)


I cannot comment on IIS configuration.

Just googling - some people were successful in their deployments:

http://jhmeier.wordpress.com/2009/10/16/acitvating-the-isapi-redirect-for-tomcat-under-iis-7-5-w2k8-r2-64-bit/

Best regards,
Konstantin Kolinko

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