Re: how do i prevent tomcat5 from adding trailing slash?

2005-07-04 Thread Edmund Urbani
Bill Barker wrote:

Edmund Urbani [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
  

hi!

i ran into some trouble with tomcat5 and its slash adding behaviour.
there's this MS WebFolder client (M$ for WebDAV), that does not seem to
be able to cope with status 302 redirects in some situations. in order
to work around this problem i modified the class
org.apache.tomcat.util.http.mapper.Mapper, so it would not add a
trailing slash for an URL like http://host:8080/slide. But since I
really don't want to (and usually don't need to) change anything about
tomcat, I'd rather have a configuration option for this. I know that the
old tomcat4 did not do redirects for this either, so I thought maybe
someone would add a config option to revert to that old behaviour.

if not, is there a any way to prevent this redirect without modifying
tomcat5's source?




I'm too lazy to look at the commit log to see what TC 5 version it was 
changed in, but if you use url-pattern/*/url-pattern for your webdav 
servlet instead of url-pattern//url-pattern, Tomcat will not send the 
302 response for a directory request.
  

thank you, thank you, thank you, thank you!!

it works. that's the kind of mail i like to see in my inbox when
i get into the office monday morning :)

i also had to change slide's default-servlet parameter to false to
make it work.

 Edmund

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how do i prevent tomcat5 from adding trailing slash?

2005-07-01 Thread Edmund Urbani

hi!

i ran into some trouble with tomcat5 and its slash adding behaviour.
there's this MS WebFolder client (M$ for WebDAV), that does not seem to
be able to cope with status 302 redirects in some situations. in order
to work around this problem i modified the class
org.apache.tomcat.util.http.mapper.Mapper, so it would not add a
trailing slash for an URL like http://host:8080/slide. But since I
really don't want to (and usually don't need to) change anything about
tomcat, I'd rather have a configuration option for this. I know that the
old tomcat4 did not do redirects for this either, so I thought maybe
someone would add a config option to revert to that old behaviour.

if not, is there a any way to prevent this redirect without modifying
tomcat5's source?

Cheers,
 Edmund


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how do i prevent tomcat5 from adding trailing slash?

2005-07-01 Thread Sheets, Jerald
Greetings...

In your mod_jk.conf, you have JkMount directives like so:

JkMount /servlet/* ajp13
JkMount /jsp-examples/* ajp13
JkMount /servlets-examples/* ajp13

I find that in your mounts that if you simply remove the trailing slash
in these, you can then call those URIs without the slash:

 
JkMount /servlet* ajp13
JkMount /jsp-examples* ajp13
JkMount /servlets-examples* ajp13

So, you can call

http://your.server.com:8080/servlet
http://your.server.com:8080/jsp-examples
http://your.server.com:8080/servlets-examples

Or, if you've mapped those guys through a connector to the parent web
server:

http://your.server.com/servlet
http://your.server.com/jsp-examples
http://your.server.com/servlets-examples

I hope that helps.

Jerald Sheets
Systems Administrator
The Weather Channel Interactive


-Original Message-
From: Edmund Urbani [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 01, 2005 9:43 AM
To: tomcat-user@jakarta.apache.org
Subject: how do i prevent tomcat5 from adding trailing slash?


hi!

i ran into some trouble with tomcat5 and its slash adding behaviour.
there's this MS WebFolder client (M$ for WebDAV), that does not seem to
be able to cope with status 302 redirects in some situations. in order
to work around this problem i modified the class
org.apache.tomcat.util.http.mapper.Mapper, so it would not add a
trailing slash for an URL like http://host:8080/slide. But since I
really don't want to (and usually don't need to) change anything about
tomcat, I'd rather have a configuration option for this. I know that the
old tomcat4 did not do redirects for this either, so I thought maybe
someone would add a config option to revert to that old behaviour.

if not, is there a any way to prevent this redirect without modifying
tomcat5's source?

Cheers,
 Edmund


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how do i prevent tomcat5 from adding trailing slash?

2005-07-01 Thread Mladen Turk

Sheets, Jerald wrote:

In your mod_jk.conf, you have JkMount directives like so:

JkMount /servlet/* ajp13
JkMount /jsp-examples/* ajp13
JkMount /servlets-examples/* ajp13

I find that in your mounts that if you simply remove the trailing slash
in these, you can then call those URIs without the slash:

 
JkMount /servlet* ajp13

JkMount /jsp-examples* ajp13
JkMount /servlets-examples* ajp13



Also from 1.2.13 you can do:

JkMount /servlet|* ajp13
JkMount /jsp-examples|* ajp13
JkMount /servlets-examples|* ajp13

This is equivalent for:

JkMount /servlet ajp13
JkMount /jsp-examples ajp13
JkMount /servlets-examples ajp13

JkMount /servlet/* ajp13
JkMount /jsp-examples/* ajp13
JkMount /servlets-examples/* ajp13

Regards,
Mladen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how do i prevent tomcat5 from adding trailing slash?

2005-07-01 Thread Edmund Urbani

actually i'm currently using a standalone tomcat with its own http
connector. working around the problem by using the apache httpd would be
helpful in some production environments, but it's at least as important
to get this to work with a standalone configuration for
development/testing and other httpd-less configurations.

besides. are you sure this would work? I mean, it looks like apache
would pass the request to tomcat nicely, but i don't see why tomcat
would change it's behaviour and NOT send back a status 302 redirect
response.

Sheets, Jerald wrote:

Greetings...

In your mod_jk.conf, you have JkMount directives like so:

JkMount /servlet/* ajp13
JkMount /jsp-examples/* ajp13
JkMount /servlets-examples/* ajp13

I find that in your mounts that if you simply remove the trailing slash
in these, you can then call those URIs without the slash:

 
JkMount /servlet* ajp13
JkMount /jsp-examples* ajp13
JkMount /servlets-examples* ajp13

So, you can call

http://your.server.com:8080/servlet
http://your.server.com:8080/jsp-examples
http://your.server.com:8080/servlets-examples

Or, if you've mapped those guys through a connector to the parent web
server:

http://your.server.com/servlet
http://your.server.com/jsp-examples
http://your.server.com/servlets-examples

I hope that helps.

Jerald Sheets
Systems Administrator
The Weather Channel Interactive


-Original Message-
From: Edmund Urbani [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 01, 2005 9:43 AM
To: tomcat-user@jakarta.apache.org
Subject: how do i prevent tomcat5 from adding trailing slash?


hi!

i ran into some trouble with tomcat5 and its slash adding behaviour.
there's this MS WebFolder client (M$ for WebDAV), that does not seem to
be able to cope with status 302 redirects in some situations. in order
to work around this problem i modified the class
org.apache.tomcat.util.http.mapper.Mapper, so it would not add a
trailing slash for an URL like http://host:8080/slide. But since I
really don't want to (and usually don't need to) change anything about
tomcat, I'd rather have a configuration option for this. I know that the
old tomcat4 did not do redirects for this either, so I thought maybe
someone would add a config option to revert to that old behaviour.

if not, is there a any way to prevent this redirect without modifying
tomcat5's source?

Cheers,
 Edmund

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: how do i prevent tomcat5 from adding trailing slash?

2005-07-01 Thread Sheets, Jerald
Works here... 

-Original Message-
From: Edmund Urbani [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 01, 2005 10:17 AM
To: Tomcat Users List
Subject: Re: how do i prevent tomcat5 from adding trailing slash?


actually i'm currently using a standalone tomcat with its own http
connector. working around the problem by using the apache httpd would be
helpful in some production environments, but it's at least as important
to get this to work with a standalone configuration for
development/testing and other httpd-less configurations.

besides. are you sure this would work? I mean, it looks like apache
would pass the request to tomcat nicely, but i don't see why tomcat
would change it's behaviour and NOT send back a status 302 redirect
response.

Sheets, Jerald wrote:

Greetings...

In your mod_jk.conf, you have JkMount directives like so:

JkMount /servlet/* ajp13
JkMount /jsp-examples/* ajp13
JkMount /servlets-examples/* ajp13

I find that in your mounts that if you simply remove the trailing slash

in these, you can then call those URIs without the slash:

 
JkMount /servlet* ajp13
JkMount /jsp-examples* ajp13
JkMount /servlets-examples* ajp13

So, you can call

http://your.server.com:8080/servlet
http://your.server.com:8080/jsp-examples
http://your.server.com:8080/servlets-examples

Or, if you've mapped those guys through a connector to the parent web
server:

http://your.server.com/servlet
http://your.server.com/jsp-examples
http://your.server.com/servlets-examples

I hope that helps.

Jerald Sheets
Systems Administrator
The Weather Channel Interactive


-Original Message-
From: Edmund Urbani [mailto:[EMAIL PROTECTED]
Sent: Friday, July 01, 2005 9:43 AM
To: tomcat-user@jakarta.apache.org
Subject: how do i prevent tomcat5 from adding trailing slash?


hi!

i ran into some trouble with tomcat5 and its slash adding behaviour.
there's this MS WebFolder client (M$ for WebDAV), that does not seem to

be able to cope with status 302 redirects in some situations. in order 
to work around this problem i modified the class 
org.apache.tomcat.util.http.mapper.Mapper, so it would not add a 
trailing slash for an URL like http://host:8080/slide. But since I 
really don't want to (and usually don't need to) change anything about 
tomcat, I'd rather have a configuration option for this. I know that 
the old tomcat4 did not do redirects for this either, so I thought 
maybe someone would add a config option to revert to that old
behaviour.

if not, is there a any way to prevent this redirect without modifying 
tomcat5's source?

Cheers,
 Edmund

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how do i prevent tomcat5 from adding trailing slash?

2005-07-01 Thread Bill Barker

Edmund Urbani [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

 hi!

 i ran into some trouble with tomcat5 and its slash adding behaviour.
 there's this MS WebFolder client (M$ for WebDAV), that does not seem to
 be able to cope with status 302 redirects in some situations. in order
 to work around this problem i modified the class
 org.apache.tomcat.util.http.mapper.Mapper, so it would not add a
 trailing slash for an URL like http://host:8080/slide. But since I
 really don't want to (and usually don't need to) change anything about
 tomcat, I'd rather have a configuration option for this. I know that the
 old tomcat4 did not do redirects for this either, so I thought maybe
 someone would add a config option to revert to that old behaviour.

 if not, is there a any way to prevent this redirect without modifying
 tomcat5's source?


I'm too lazy to look at the commit log to see what TC 5 version it was 
changed in, but if you use url-pattern/*/url-pattern for your webdav 
servlet instead of url-pattern//url-pattern, Tomcat will not send the 
302 response for a directory request.

 Cheers,
 Edmund 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]