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, iis connector and case sensitivity
Date Mon, 16 Jun 2008 10:43:14 GMT


Luis Villa wrote:
> Hello André, thanks for your answer,
> 
> My configuration is:
> 
> 
>    - tomcat 6
>    - IIS 6
>    - Windows 2003 server SP1
>    - tomcat connector 1.2.26
> 
> When I ask for MYAP, it doesn't appear a IIS screen, but a Tomcat error. So,
> I assumed the connector was correctly deriving the requests from IIS to
> Tomcat.
> 

And you probably then assume correctly.
In the Tomcat error page, do you see anything that shows which URL it is 
trying to handle, and is it the "untranslated" one ?
If not in the Tomcat error page, then some Tomcat log should show which 
URL it is trying to process.  You may have to enable the "Access Log 
Valve" for that.
(In one Tomcat 5.5 config I have, the following is defined in the 
server.xml, inside the respective <Host> container :
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
  directory="logs"  prefix="localhost_access" suffix=".log"
  rotatable="false" pattern="common" resolveHosts="false"/>
)

Of course, a quick and dirty fix would probably be to modify the web.xml 
of your application, to match the various URIs you can get, like :
instead of
<url-pattern>MyApplication</url-pattern>
make it
<url-pattern>MyApplication</url-pattern>
<url-pattern>MYAPP</url-pattern>
<url-pattern>MYAPPLICATION</url-pattern>
<url-pattern>myapplication</url-pattern>
etc..
(you have to verify, but I think the <url-pattern> can be repeated.)
Maybe also (since it's called "url-pattern"), this is a regexp, in which 
case there might be a more elegant way to specify this.

André







> 
> 2008/6/16 André Warnier <aw@ice-sa.com>:
> 
>>
>> Luis Villa wrote:
>>
>>> Hello all,
>>>
>>> I'm trying to add redirect rules to the tomcat connector. I've been
>>> reading
>>> Tomcat connector documentation, and what I've done till the moment is
>>> this:
>>>
>>> 1.- I've created a rewrite_rules.properties with this content:
>>>
>>>      /myapplication/=/MyApplication/
>>>      /MYAPPLICATION/=/MyApplication/
>>>      /MYAP/=/MyApplication/
>>>
>>> 2.- I've added this to isapi_redirect.properties:
>>>
>>>       # Full path to the rewrite_rules.properties file
>>>
>>> rewrite_rule_file=c:\apache-tomcat-6.0.14\conf\rewrite_rules.properties
>>>
>>> ... but it only works with /MyApplication/ (the name in webapps in
>>> tomcat).
>>> Any other form (myapplication, MYAPPLICATION or MYAP) returns a 404 error.
>>>
>>>  Hi.
>> It might be a good idea to provide a bit of detail about your
>> configuration, it would help the people trying to help you.
>> One can kind of guess from the above that you are running under Windows,
>> with Tomcat 6.0.14, and are using an isapi connector, thus from IIS or the
>> like, but it requires some effort.
>>
>> I don't really know that precise environment, but I'll take a pot-shot
>> anyway : is it not that your rewrite rules are being run too late, and they
>> never see requests with /myapplication/, /MYAPPLICATION/ or /MYAP/ ?
>> Presumably, before they get to the isapi connector, requests go to the
>> front-end HTTPD server.  If that one does not know that it should redirect
>> /myapplication/, /MYAPPLICATION/ or /MYAP/ to the connector, then the
>> connector never gets to see them.
>> Instead, the HTTPD server will try to serve those requests itself, and
>> since it doesn't have those documents, respond with 404.
>> Does the 404 error page look like a Tomcat page, or else ?
>>
>> André
>>
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@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