RE: RewriteRules and Standalone Tomcat
Has the patch to prevent the 302 redirect of the default welcome file been included in Tomcat 5? I looked at the possiblity of applying the patch to Tomcat 4 but I have to admit I am not comfortable building Tomcat on a Linux server as this would require me to do. So I am *hoping* that this is a feature in Tomcat 5 (please please please!!!)?!?!?! :) Thanks. Neal -Original Message- From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:34 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Neal, I told you that solution in the context of your avoiding a redirect (302), not in the context of standalone Tomcat. mod_rewrite is an Apache module. http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg38750.html is the start of a thread on patching Tomcat to do a forward instead of a redirect. Matt Parker's latest patch (not the one in the message) was approved, so long as he keeps the default to the current behavior for now. For Tomcat 5, Remy Maucherat plans to include this functionality in the mapper. --- Noel P.S. If someone needs something from me, direct e-mail might be useful if I don't reply to the list promptly. I'm swamped, and sometimes don't have time to get to the tomcat-user folder. This was my first (and probably only) pass today, and I only checked this thread because RewriteRules is one of my fun topics. -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Actually, I always thought this was a requirement anyway. I mean it makes perfect sense that you have an index.html or index.jsp as a default page for any given directory ... including the root directory. So, I would actually expect that sort of behavior. I think you're right - this is how most other web servers currently work. As for breaking existing applications, i see your point but at least there's a solution there ... to place the welcome file into the correct directory position. Otherwise, there is no solution to the redirect problem. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:52 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, neal wrote: Date: Wed, 8 Jan 2003 23:38:13 -0800 From: neal [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat In you previous email you say: This still screws up relative references for people that use wierd welcome file paths like 'foo/bar.html', but will work for the majority. What do you mean by wierd welcome file paths. Consider the following entry in a web.xml file: welcome-file-list welcome-filefoo/bar.html/welcome-file /welcome-file-list If we change Tomcat to forwarding to the welcome file, relative references in the bar.html page will still be broken (because they are resolved by the browser, not the server). For the typical case: welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list The proposed solution (if there's no trailing slash, redirect to the original URL + /, otherwise forward) will work, and this is by far the most common case -- but the change is still going to break existing applications for some existing users. Will most relative paths still work? Is this the same sort of relative file path issues I would see if I forwarded (rather than redirect) from one JSP to another? If so, wouldn't this only be an issue if the welcome file was located somewhere other than the root of the application? Nothing in this discussion about welcome files has *any* impact on the way that relative URLs work in non-welcome pages. Even if we change the behavior of welcome files, they will continue to work the way they work today. The key to understanding what's going on is the following: * It is the *browser* that resolves relative URIs, not the server. * The *browser* resolves relative URIs against the URL showing in the location bar (unless you use a base element, which is pretty unusual). * A redirect changes the URL showing in the location bar, but a forward does not. The current behavior (redirect always) was done because, for Tomcat 3.0 and 3.1 (which did forwarding instead), a very FAQ question on TOMCAT-USER was why can't I use a relative URI in my welcome pages. This problem, of course, went away when we switched to redirect always, and has been the way that Tomcat has worked for the last several years. Given that users are going to complain no matter what the behavior is, the right answer is to find a balance that works the best for the most. The proposed solution (redirect to a URL with a trailing slash, or forward if there already is one) seems like a good candidate to meet that goal. By the way, Tomcat gets 80,000-120,000 downloads every single month (bigger numbers in the months when there are big new releases). I guess there are at least a few people in the world who think Tomcat is still commercially viable, in spite of what you consider a fatal flaw :-). Guess I won't be trusting *your* judgement on which server to use for my next application. :-) Neal Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:24 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, neal wrote: Date: Wed, 8 Jan 2003 23:11:44 -0800 From: neal [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat So, in this scenario .. if a url without a directory is given and without a trailign slash, the redirect would not occur? That would fix this issue. I could certainly get behind that. :) You will change that opinion as soon as you realize that relative URIs in your welcome pages do not work any more :-). if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. This is the right answer, IMHO. It also includes the use case where you just say: http://www.mycompany.com which is (essentially) a request for the welcome file of the top-level directory
RE: RewriteRules and Standalone Tomcat
I've deployed an app using Tomcat Standalone (www.hotel.us) and while there have been several issues that were a little less than obvious, I have found a solution to every single one of them and am overall pretty satisfied with tomcat. but this one little thing would force me to have to go to apache. As has been said, try Matt Parker's patch. It should work the way that Craig mentioned, and Tomcat 5 should also work that way from what I read. 1. A comparison was made - using tomcat as a web server is like racing a mac truck. Yeah, that'd be my stated opinion, and I'm sure that someone will disagree with it. As far as I'm concerned, for many applications Tomcat Standalone is like flying cotton canvas sails on a beautiful ACC sloop. Yeah, you'll get somewhere, but I'll take Kevlar any time. Note that in this metaphor, Tomcat is a beautiful ACC sloop (nicer imagery than a Mack truck), but the built-in web server (cotton canvas) still isn't the equal of Apache (Kevlar). If you want the most out of your boat, you equip it properly. If this sort of issue is defended by the community (302s etc) then there should be a blatant disclaimer when downloading the standalone that it is not intended for production use. I have no idea whether the Tomcat developers actually consider the built-in web server to be production quality or not. It really would depend upon what you demanded of it. Personally, I'd never use it except for prototyping. Even for a Web service server, I might want the load balancing option provided by a front-end server. But, again, that's my personal opinion. YMMV. And, once again, since you have a published fix for the problem, I can't see that this is redirect v forward issue should continue to be viewed as an issue. --- Noel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
I would disagree 100%. You're assuming that priority one for any commercial use of Tomcat is maximizing search engine placement for a given URL. I would be surprised if, out of all the people using Tomcat in a commercial situation, that was priority one for more than .1% or so. We're selling our applications like crazy, which use Tomcat, but then again, we use Apache as a rule for things on port 80. As far as we're concerned, Tomcat is perfect. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:18 AM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Well, a few things come to mind. 1. A comparison was made - using tomcat as a web server is like racing a mac truck. Well, for someone new to tomcat and apache (I just arrived from microsoft/iis land) the correct usage pattern was less than obvious ... I just knew that most people used tomcat/apache. I could have never anticipated this sort of issue. If this sort of issue is defended by the community (302s etc) then there should be a blatant disclaimer when downloading the standalone that it is not intended for production use. 2. As to teh chicken and egg analogy - that's a good point - does theory or an unfortunate reality dictate the direction of the product? I guess I would defer to point #1. If the product is not going to address the very real issues of production use, it should make it clear to users that it is not indended for production use. Granted the ideal is to sluff off such petty and rediculous issues put forth by the search engine defenses, but at the end of that argument the issue still exists as does the sobering fact that this will be a significant problem for anyone who chooses to deploy a commercial application using the product. neal --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Me too. Especially if the solution is sooo simple: Just submit the url with the path to the welcome file to the searchenengines and most of them will be happy with that. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:32 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat I would disagree 100%. You're assuming that priority one for any commercial use of Tomcat is maximizing search engine placement for a given URL. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Its *not* that simple. Pagerank (guaging inbound links from other sites) would need to all be coordinated to point to that specifc file. This would be very difficult. PR is the most significant factor in SERPs on most modern engines and if a good inbound link was to point to your base URL (which most will do) its not going to count when the engine realizes it is a 302. :( -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:42 AM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Me too. Especially if the solution is sooo simple: Just submit the url with the path to the welcome file to the searchenengines and most of them will be happy with that. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:32 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat I would disagree 100%. You're assuming that priority one for any commercial use of Tomcat is maximizing search engine placement for a given URL. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
I'm not presuming its priority #1 always, but yes I am presuming it is a very high priority ... but ... 80% of web traffic comes from search engines. Unless you're one you've got a major print and media advertising budget how else do you drive traffic? I suppose there are other possible scenarios such as Intranets or B2B apps, but I would suspect SEO is a significant factor for most who would deploy a commercial web application. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:32 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat I would disagree 100%. You're assuming that priority one for any commercial use of Tomcat is maximizing search engine placement for a given URL. I would be surprised if, out of all the people using Tomcat in a commercial situation, that was priority one for more than .1% or so. We're selling our applications like crazy, which use Tomcat, but then again, we use Apache as a rule for things on port 80. As far as we're concerned, Tomcat is perfect. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:18 AM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Well, a few things come to mind. 1. A comparison was made - using tomcat as a web server is like racing a mac truck. Well, for someone new to tomcat and apache (I just arrived from microsoft/iis land) the correct usage pattern was less than obvious ... I just knew that most people used tomcat/apache. I could have never anticipated this sort of issue. If this sort of issue is defended by the community (302s etc) then there should be a blatant disclaimer when downloading the standalone that it is not intended for production use. 2. As to teh chicken and egg analogy - that's a good point - does theory or an unfortunate reality dictate the direction of the product? I guess I would defer to point #1. If the product is not going to address the very real issues of production use, it should make it clear to users that it is not indended for production use. Granted the ideal is to sluff off such petty and rediculous issues put forth by the search engine defenses, but at the end of that argument the issue still exists as does the sobering fact that this will be a significant problem for anyone who chooses to deploy a commercial application using the product. neal --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Bascially, this all goes away with about 60 minutes of work with Apache and a connector, assuming, based on what you've posted before, one site/domain name, and a relatively simple Tomcat Context/webapp configuration. Frankly, you are asking (begging?) for trouble if you are going to run Tomcat on port 80 (it has to run as root unlike Apache) to serve a site where public availability is such a priority. All due respect to Tomcat and the efforts of the dev team (I do feel Tomcat rocks), but that's like a deer running around in deer season with a bullseye painted on it's fur. If you told me: Design a solution that will be used by a company to get as much public exposure as possible, with public exposure being top priority and by the way it has to be secure and we don't want any trouble from crackers the FIRST thing I would do would be install Apache. Bar none. THEN I would consider which engine to use for dynamic resolution, out of all the alternatives available, Tomcat only being one of them. You've got a classic trade-off situation going. Tomcat Stand-alone is easy and convenient to use as a web server (port 80), but doing so has its drawbacks. Adding Apache as a head for Tomcat is less easy and not as convenient (drawbacks) but it also has its advantages (solves your 302 issue). The only person who can make the call is you. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 6:52 AM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Its *not* that simple. Pagerank (guaging inbound links from other sites) would need to all be coordinated to point to that specifc file. This would be very difficult. PR is the most significant factor in SERPs on most modern engines and if a good inbound link was to point to your base URL (which most will do) its not going to count when the engine realizes it is a 302. :( -Original Message- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:42 AM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Me too. Especially if the solution is sooo simple: Just submit the url with the path to the welcome file to the searchenengines and most of them will be happy with that. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:32 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat I would disagree 100%. You're assuming that priority one for any commercial use of Tomcat is maximizing search engine placement for a given URL. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
I'd love to see a cite for 80% of web traffic comes from search engines. I've worked on plenty of high-traffic public websites in my day, and have never, ever found that to be the case. If anything, more traffic comes from portals such as Yahoo, AOL, and MSN than anywhere else, and by that I mean direct links from the main page, which cost money. People don't get to nike.com by typing shoes in a search engine. Shoes on Google gets Vegetarian Shoes as the first link. Yeah, that's relevant. In my experience, search engine placement as a priority is the technique used by sites that don't have any money and want traffic for free. Keep in mind that traffic != sales, and traffic != revenue. They're not even directly proportional. How you drive traffic depends on the target audience. Sometimes its a search engine, I would say search engines are the last place people look when they want to spend money. Search engines are used, in my opinion, by people looking for information or anything else that's free, not for someplace to spend money. CDs at Google doesn't get me Amazon, yet that's the first place I go when I want to buy a CD from a major artist. Even a specific artist like Eminem CD doesn't get me Amazon anywhere near the top of the results. For us, our Tomcat-based commercial applications are sold face-to-face by salespeople. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 6:54 AM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat I'm not presuming its priority #1 always, but yes I am presuming it is a very high priority ... but ... 80% of web traffic comes from search engines. Unless you're one you've got a major print and media advertising budget how else do you drive traffic? I suppose there are other possible scenarios such as Intranets or B2B apps, but I would suspect SEO is a significant factor for most who would deploy a commercial web application. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
On Thu, 9 Jan 2003, neal wrote: Date: Thu, 9 Jan 2003 03:54:05 -0800 From: neal [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat I'm not presuming its priority #1 always, but yes I am presuming it is a very high priority ... but ... 80% of web traffic comes from search engines. There's no way to back this up with facts, but I would bet you that around the entire world Tomcat gets 1000s of times more requests from intranet applications than from Internet apps -- and of course search engines are totally irrelevant to that environment :-). Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
You're comparing apples and oranges .. and pears (staying with the analogies ;-)). A high profile site of course does not need the engines to the same extent as a small site. Additionally, a small site with a mature link base (100s or 1000s of grade A links) will not recieve as much traffic from them either. For a new site (first year or so) its just the opposite. Besides, I was including places like Yahoo!, AOL, when I refer to search engine. Granted these are CPCs (fake search engines) but nonetheless google probably has 80% of the search engine market ... as for the 80% of traffic coming from search engines - its a statistic I recently read in a book. I can look it up for you if interested. If sounds though like the truth of this statistic has a lot to do with whether you're comparing apples ... oranges ... or pears. As for switching to Apache with 1hr work ... I'm also bucking that just because (a) my ISP will want to get involved and charge me hourly for the setup of an addt'l app and (b) I will have to get another $300 SSL cert from Trawte if I go that road. Sigh. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 5:34 AM To: 'Tomcat Users List' Subject: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat I'd love to see a cite for 80% of web traffic comes from search engines. I've worked on plenty of high-traffic public websites in my day, and have never, ever found that to be the case. If anything, more traffic comes from portals such as Yahoo, AOL, and MSN than anywhere else, and by that I mean direct links from the main page, which cost money. People don't get to nike.com by typing shoes in a search engine. Shoes on Google gets Vegetarian Shoes as the first link. Yeah, that's relevant. In my experience, search engine placement as a priority is the technique used by sites that don't have any money and want traffic for free. Keep in mind that traffic != sales, and traffic != revenue. They're not even directly proportional. How you drive traffic depends on the target audience. Sometimes its a search engine, I would say search engines are the last place people look when they want to spend money. Search engines are used, in my opinion, by people looking for information or anything else that's free, not for someplace to spend money. CDs at Google doesn't get me Amazon, yet that's the first place I go when I want to buy a CD from a major artist. Even a specific artist like Eminem CD doesn't get me Amazon anywhere near the top of the results. For us, our Tomcat-based commercial applications are sold face-to-face by salespeople. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 6:54 AM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat I'm not presuming its priority #1 always, but yes I am presuming it is a very high priority ... but ... 80% of web traffic comes from search engines. Unless you're one you've got a major print and media advertising budget how else do you drive traffic? I suppose there are other possible scenarios such as Intranets or B2B apps, but I would suspect SEO is a significant factor for most who would deploy a commercial web application. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
If the site has real value, the customers will find it all by themselves. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 1:03 PM To: Tomcat Users List Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat You're comparing apples and oranges .. and pears (staying with the analogies ;-)). A high profile site of course does not need the engines to the same extent as a small site. Additionally, a small site with a mature link base (100s or 1000s of grade A links) will not recieve as much traffic from them either. For a new site (first year or so) its just the opposite. Besides, I was including places like Yahoo!, AOL, when I refer to search engine. Granted these are CPCs (fake search engines) but nonetheless google probably has 80% of the search engine market ... as for the 80% of traffic coming from search engines - its a statistic I recently read in a book. I can look it up for you if interested. If sounds though like the truth of this statistic has a lot to do with whether you're comparing apples ... oranges ... or pears. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
Oh C'mon! How?!?!?! Telepathy? ;-) I know that there are other means such as word of mouth and as Craig said there's probably not a way to verify these numbers anyway ... besides I'm just quoting what I read. But whether you agree with the 80% number or not I would think surely the outrageous fees charged by competent SEOs is proof enough of their significance. On the Google lists I participate in, its commonly acknowledged that getting dropped from Google can break the back of many internet businesses. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:17 AM To: 'Tomcat Users List' Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat If the site has real value, the customers will find it all by themselves. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 1:03 PM To: Tomcat Users List Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat You're comparing apples and oranges .. and pears (staying with the analogies ;-)). A high profile site of course does not need the engines to the same extent as a small site. Additionally, a small site with a mature link base (100s or 1000s of grade A links) will not recieve as much traffic from them either. For a new site (first year or so) its just the opposite. Besides, I was including places like Yahoo!, AOL, when I refer to search engine. Granted these are CPCs (fake search engines) but nonetheless google probably has 80% of the search engine market ... as for the 80% of traffic coming from search engines - its a statistic I recently read in a book. I can look it up for you if interested. If sounds though like the truth of this statistic has a lot to do with whether you're comparing apples ... oranges ... or pears. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
Is that right? The key we generated for Tomcat will also work on Apache?!?! This is surpising (though a plesant suprise) because the method by which we had to create the key for tomcat was different than what the admin had apparently done prior with Apache. -Original Message- From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:43 AM To: Tomcat Users List Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat (a) my ISP will want to get involved and charge me hourly for the setup of an addt'l app This is hosted on their server, and they don't have apache installed? Who is the hosting service? (b) I will have to get another $300 SSL cert from Trawte Why? The domain name isn't changing, and both Apache and Tomcat use X.509 certs. What's the issue? --- Noel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
I can only comment on my own experience. I'm assuming that the application wants to earn revenue, and not do so from advertising (ad-only models rarely work). That means sales. I've been purchasing on the net since 1996. Unless the site has a product that no one else on earth and no other site has, the true differentiator (and driver) of success in the long term will be dollar value, user experience, and customer support, not search engine placement. In that scenario, good placement on sites like epinions.com and resellerratings.com, etc. from regular customers is much more valuable. Let's face it, just about any product being sold nowadays, including software, is a commodity item. If it's a high ticket item, then chances are a face-to-face (or several) will be required to get a check, which makes search engine placement just about irrelevant, as a good salesperson working on 100% commission (the good ones always work on 100% commission) will have no problem developing their own leads. If it were me, and I was designing a business model, the last place I would be spending time and resources would be search engine placement, or gyrating an application to enhance search engine placement. ;) But that's me. The search engine placement lists and groups are very similar to the get more traffic lists and groups. I've lurked on both over the years, and I could never get past the idea that in just about every case, it's pretty much just endless discussions about churn. Generic traffic is just the same set of eyeballs over and over, and the traffic brokers you run into will NEVER back up their claims with sales conversion numbers, because they know full well that there is no relationship between the number of people visiting a site and the total amount of sales. They'll claim 10,000 unique visitors to your site this week guaranteed!! but that has no bearing whatsoever on sales. I'd rather focus on making my customers stunned by the value and good customer service I provide. I'll get lots more sales that way over time. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:26 PM To: Tomcat Users List Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat Oh C'mon! How?!?!?! Telepathy? ;-) I know that there are other means such as word of mouth and as Craig said there's probably not a way to verify these numbers anyway ... besides I'm just quoting what I read. But whether you agree with the 80% number or not I would think surely the outrageous fees charged by competent SEOs is proof enough of their significance. On the Google lists I participate in, its commonly acknowledged that getting dropped from Google can break the back of many internet businesses. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:17 AM To: 'Tomcat Users List' Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat If the site has real value, the customers will find it all by themselves. John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
You just have to use, if I remember correctly, the keystore app to export the key and then import it. Whether your ISP knows how to do that is another issue entirely. Heck, you might not even need to do that, you might just be able to point Apache to the appropriate keystore. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:48 PM To: Tomcat Users List Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat Is that right? The key we generated for Tomcat will also work on Apache?!?! This is surpising (though a plesant suprise) because the method by which we had to create the key for tomcat was different than what the admin had apparently done prior with Apache. -Original Message- From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:43 AM To: Tomcat Users List Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat (a) my ISP will want to get involved and charge me hourly for the setup of an addt'l app This is hosted on their server, and they don't have apache installed? Who is the hosting service? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
SSL Certs for Tomcat and Apache (was RE: RewriteRules and Standalone Tomcat)
Neal wrote: Is that right? The key we generated for Tomcat will also work on Apache?!?! This is surpising (though a plesant suprise) because the method by which we had to create the key for tomcat was different than what the admin had apparently done prior with Apache. Noel wrote: Neal wrote: (b) I will have to get another $300 SSL cert from Trawte Why? The domain name isn't changing, and both Apache and Tomcat use X.509 certs. What's the issue? The tools were different (openssl for apache, keytool for tomcat), but the method should have been the same. And the keys should be compatible, even if you have to do some exporting and importing. I haven't tried this migration, yet, but I can't see any reason why it should not work fine. If you look at the Thawte site, they have instructions for migrating keys between IIS and apache, for example. --- Noel -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
Hiya Neal (and others) As a counterpoint to your argument about search engines and small sites I have some real numbers: From my website referrer stats: (For an Apache HTTP: http://www.eaves.org) Direct requests : 28% Google.com : 1.5% Google images : 0.7% search.yahoo.com : 0.3% Google.ca : 0.15% Google.co.uk : 0.15% Google.it : 0.11% Google.de : 0.09% Google.com.au : 0.08% Google.co.nz : 0.06% Google.fr : 0.03% Google.pl : 0.03% Google.nl : 0.03% altavista.com : 0.03% au.altavista.com : 0.02% The rest of the traffic is from a whole load of Java MIDlet portals. Total search engines combined: ~4% Now, I'm not running java.sun.com or anything like that but for a personal website I get an average of 30,000 hits a month, and I suspect that the only way that people find my site would be: 1. Signature links in email 2. Search engines It's not like anybody is going to be trying to guess my URL just to see what is there ;-) And the best thing is that I have a site that is just running Tomcat, on a wacky URL to compare this against: (Tomcat: http://www.eaves.org:28080/) Direct requests : 55% looksmart.com : 15% eaves.org : 9% google : 6% search.msn.com : 5% yahoo.com : 1% google.ca : 1% Now, I don't trust these numbers as much because the hits are so much lower 2000 hits a month, but it's clear in my case that there is no, or little penalty for whatever behaviour Tomcat might have. Of course, YMMV, batteries not includes, offer void where prohibited by law. Cheers, -- jon neal wrote: You're comparing apples and oranges .. and pears (staying with the analogies ;-)). A high profile site of course does not need the engines to the same extent as a small site. Additionally, a small site with a mature link base (100s or 1000s of grade A links) will not recieve as much traffic from them either. For a new site (first year or so) its just the opposite. Besides, I was including places like Yahoo!, AOL, when I refer to search engine. Granted these are CPCs (fake search engines) but nonetheless google probably has 80% of the search engine market ... as for the 80% of traffic coming from search engines - its a statistic I recently read in a book. I can look it up for you if interested. If sounds though like the truth of this statistic has a lot to do with whether you're comparing apples ... oranges ... or pears. As for switching to Apache with 1hr work ... I'm also bucking that just because (a) my ISP will want to get involved and charge me hourly for the setup of an addt'l app and (b) I will have to get another $300 SSL cert from Trawte if I go that road. Sigh. Neal -- Jon Eaves [EMAIL PROTECTED] http://www.eaves.org/jon/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat
Yes but its not that simple. So many factors would play into each individuals site's break down. If you don't focus on them, if you don't optimize for them, and if you have significant other sources of traffic of course that will throw off the thing ... particularly if you have relationships through these midlets. No doubt every site is different but search engines are still the yellow pages of the Internet and with the Internet verging on information overload, ppl are bound to rely even more on central directories are enginesparticularly for new and lesser known sites. If we are to truly contest these numbers we would have to look at sooo many different factors and a rather large cross-section. I hear what you're saying that it is entirely possible to be autonomous from the engines, but many people ... I would venture to say most are not! But I guess that's all speculation unless we care to undertake a dramatic new survey of Internet and search engine usage patterns. ;-) -Original Message- From: Jon Eaves [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:59 PM To: Tomcat Users List Subject: Re: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat Hiya Neal (and others) As a counterpoint to your argument about search engines and small sites I have some real numbers: From my website referrer stats: (For an Apache HTTP: http://www.eaves.org) Direct requests : 28% Google.com : 1.5% Google images : 0.7% search.yahoo.com : 0.3% Google.ca : 0.15% Google.co.uk : 0.15% Google.it : 0.11% Google.de : 0.09% Google.com.au : 0.08% Google.co.nz : 0.06% Google.fr : 0.03% Google.pl : 0.03% Google.nl : 0.03% altavista.com : 0.03% au.altavista.com : 0.02% The rest of the traffic is from a whole load of Java MIDlet portals. Total search engines combined: ~4% Now, I'm not running java.sun.com or anything like that but for a personal website I get an average of 30,000 hits a month, and I suspect that the only way that people find my site would be: 1. Signature links in email 2. Search engines It's not like anybody is going to be trying to guess my URL just to see what is there ;-) And the best thing is that I have a site that is just running Tomcat, on a wacky URL to compare this against: (Tomcat: http://www.eaves.org:28080/) Direct requests : 55% looksmart.com : 15% eaves.org : 9% google : 6% search.msn.com : 5% yahoo.com : 1% google.ca : 1% Now, I don't trust these numbers as much because the hits are so much lower 2000 hits a month, but it's clear in my case that there is no, or little penalty for whatever behaviour Tomcat might have. Of course, YMMV, batteries not includes, offer void where prohibited by law. Cheers, -- jon neal wrote: You're comparing apples and oranges .. and pears (staying with the analogies ;-)). A high profile site of course does not need the engines to the same extent as a small site. Additionally, a small site with a mature link base (100s or 1000s of grade A links) will not recieve as much traffic from them either. For a new site (first year or so) its just the opposite. Besides, I was including places like Yahoo!, AOL, when I refer to search engine. Granted these are CPCs (fake search engines) but nonetheless google probably has 80% of the search engine market ... as for the 80% of traffic coming from search engines - its a statistic I recently read in a book. I can look it up for you if interested. If sounds though like the truth of this statistic has a lot to do with whether you're comparing apples ... oranges ... or pears. As for switching to Apache with 1hr work ... I'm also bucking that just because (a) my ISP will want to get involved and charge me hourly for the setup of an addt'l app and (b) I will have to get another $300 SSL cert from Trawte if I go that road. Sigh. Neal -- Jon Eaves [EMAIL PROTECTED] http://www.eaves.org/jon/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
What you're talking about is repeat business .. I'm talking about getting the introductions in the first place. Well, aside from the discussion of the importance of SEs in a business model, I think most would agree it is a commonly used tool - independent of ideals. I'm going to look more into Apache and I will also take a look at the patch that apparently exists for working around the 302 that someone else wrote. Thanks for the tips. As for the future of Tomcat in this regard, I personally would love to see the 302 thing go away. It will be interesting to see which direction is taken. Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 12:10 PM To: 'Tomcat Users List' Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat I can only comment on my own experience. I'm assuming that the application wants to earn revenue, and not do so from advertising (ad-only models rarely work). That means sales. I've been purchasing on the net since 1996. Unless the site has a product that no one else on earth and no other site has, the true differentiator (and driver) of success in the long term will be dollar value, user experience, and customer support, not search engine placement. In that scenario, good placement on sites like epinions.com and resellerratings.com, etc. from regular customers is much more valuable. Let's face it, just about any product being sold nowadays, including software, is a commodity item. If it's a high ticket item, then chances are a face-to-face (or several) will be required to get a check, which makes search engine placement just about irrelevant, as a good salesperson working on 100% commission (the good ones always work on 100% commission) will have no problem developing their own leads. If it were me, and I was designing a business model, the last place I would be spending time and resources would be search engine placement, or gyrating an application to enhance search engine placement. ;) But that's me. The search engine placement lists and groups are very similar to the get more traffic lists and groups. I've lurked on both over the years, and I could never get past the idea that in just about every case, it's pretty much just endless discussions about churn. Generic traffic is just the same set of eyeballs over and over, and the traffic brokers you run into will NEVER back up their claims with sales conversion numbers, because they know full well that there is no relationship between the number of people visiting a site and the total amount of sales. They'll claim 10,000 unique visitors to your site this week guaranteed!! but that has no bearing whatsoever on sales. I'd rather focus on making my customers stunned by the value and good customer service I provide. I'll get lots more sales that way over time. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 2:26 PM To: Tomcat Users List Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat Oh C'mon! How?!?!?! Telepathy? ;-) I know that there are other means such as word of mouth and as Craig said there's probably not a way to verify these numbers anyway ... besides I'm just quoting what I read. But whether you agree with the 80% number or not I would think surely the outrageous fees charged by competent SEOs is proof enough of their significance. On the Google lists I participate in, its commonly acknowledged that getting dropped from Google can break the back of many internet businesses. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 11:17 AM To: 'Tomcat Users List' Subject: RE: [OFF-TOPIC] RE: RewriteRules and Standalone Tomcat If the site has real value, the customers will find it all by themselves. John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
The cost of getting a new customer is much higher than the cost of servicing a repeat customer. For example, in the cellular industry, the last number I saw was $400 to get a new customer (in the US). So, at $39.99/month or less, it's at least 10 months or longer before you even see a dime of profit, not to mention the cost of supporting that customer that first year. And if they leave, you end up with nothing. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 4:42 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat What you're talking about is repeat business .. I'm talking about getting the introductions in the first place. Well, aside from the discussion of the importance of SEs in a business model, I think most would agree it is a commonly used tool - independent of ideals. I'm going to look more into Apache and I will also take a look at the patch that apparently exists for working around the 302 that someone else wrote. Thanks for the tips. As for the future of Tomcat in this regard, I personally would love to see the 302 thing go away. It will be interesting to see which direction is taken. Thanks. Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RewriteRules and Standalone Tomcat
What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Beat me with a stick if I'm wrong, but RewriteRule is for Apache when using mod_rewrite, I don't think you can use it in server.xml or web.xml. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 AM To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Oh. :( But this was actually a solution offered specific to a Tomcat issue: Issue: Unlike Apache, tomcat automatically redirects to the welcome page, rather than forwarding. In other words, to present the welcome page tomcat will literally redirect (http 302) to www.xyz.com/index.html, rather than staying at www.xyz.com. I do not want this effect as I am affraid it will have negative effects on my search engine placement. I was given the advice to use a RewriteRule to fix this problem. If this is not the solution, does anyone know what the solution is? I was told this is actually a feature of tomcat ... I call it a PAIN IN THE ASS, and a serious oversight for standalone Tomcat. Anyone know a solution? Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:16 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Beat me with a stick if I'm wrong, but RewriteRule is for Apache when using mod_rewrite, I don't think you can use it in server.xml or web.xml. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 AM To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
That would explain why I found references to RewriteRules for Apache on the Internet, but none for Tomcat. Damn! -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:16 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Beat me with a stick if I'm wrong, but RewriteRule is for Apache when using mod_rewrite, I don't think you can use it in server.xml or web.xml. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 AM To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Yes, specific to a Tomcat issue, but the solution incorporates Apache. :) John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:54 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Oh. :( But this was actually a solution offered specific to a Tomcat issue: Issue: Unlike Apache, tomcat automatically redirects to the welcome page, rather than forwarding. In other words, to present the welcome page tomcat will literally redirect (http 302) to www.xyz.com/index.html, rather than staying at www.xyz.com. I do not want this effect as I am affraid it will have negative effects on my search engine placement. I was given the advice to use a RewriteRule to fix this problem. If this is not the solution, does anyone know what the solution is? I was told this is actually a feature of tomcat ... I call it a PAIN IN THE ASS, and a serious oversight for standalone Tomcat. Anyone know a solution? Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:16 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Beat me with a stick if I'm wrong, but RewriteRule is for Apache when using mod_rewrite, I don't think you can use it in server.xml or web.xml. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 AM To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Oh, does that mean it *is* possible to use RewriteRules with Tomcat Standalone then? :-\ Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:04 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Yes, specific to a Tomcat issue, but the solution incorporates Apache. :) John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:54 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Oh. :( But this was actually a solution offered specific to a Tomcat issue: Issue: Unlike Apache, tomcat automatically redirects to the welcome page, rather than forwarding. In other words, to present the welcome page tomcat will literally redirect (http 302) to www.xyz.com/index.html, rather than staying at www.xyz.com. I do not want this effect as I am affraid it will have negative effects on my search engine placement. I was given the advice to use a RewriteRule to fix this problem. If this is not the solution, does anyone know what the solution is? I was told this is actually a feature of tomcat ... I call it a PAIN IN THE ASS, and a serious oversight for standalone Tomcat. Anyone know a solution? Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:16 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Beat me with a stick if I'm wrong, but RewriteRule is for Apache when using mod_rewrite, I don't think you can use it in server.xml or web.xml. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 AM To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: RewriteRules and Standalone Tomcat
Yes, but your requests must be passed through Apache to Tomcat-Standalone via mod_jk. We do this on our site and it works nicely. The URL requests are processed by mod_rewrite before mod_jk forwards them to Tomcat, so the Apache behavior you desired is achieved. I don't think that Tomcat-Standalone means what it looks like it should mean, if you know what I mean ;-) Gary neal wrote: Oh, does that mean it *is* possible to use RewriteRules with Tomcat Standalone then? :-\ Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:04 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Yes, specific to a Tomcat issue, but the solution incorporates Apache. :) John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:54 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Oh. :( But this was actually a solution offered specific to a Tomcat issue: Issue: Unlike Apache, tomcat automatically redirects to the welcome page, rather than forwarding. In other words, to present the welcome page tomcat will literally redirect (http 302) to www.xyz.com/index.html, rather than staying at www.xyz.com. I do not want this effect as I am affraid it will have negative effects on my search engine placement. I was given the advice to use a RewriteRule to fix this problem. If this is not the solution, does anyone know what the solution is? I was told this is actually a feature of tomcat ... I call it a PAIN IN THE ASS, and a serious oversight for standalone Tomcat. Anyone know a solution? Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:16 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Beat me with a stick if I'm wrong, but RewriteRule is for Apache when using mod_rewrite, I don't think you can use it in server.xml or web.xml. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 AM To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
It sounds like you are saying that you must also run Apache ... that Tomcat alone is not sufficient. Is this correct? And that I would setup mod_rewrite within Apache before it gets to Tomcat? Wouldn't this then mean that you're not actually using Apache as a Standalone? Are you connecting to Tomcat via WARP? I'm confused. :( -Original Message- From: Gary Gwin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:35 PM To: Tomcat Users List Subject: Re: RewriteRules and Standalone Tomcat Yes, but your requests must be passed through Apache to Tomcat-Standalone via mod_jk. We do this on our site and it works nicely. The URL requests are processed by mod_rewrite before mod_jk forwards them to Tomcat, so the Apache behavior you desired is achieved. I don't think that Tomcat-Standalone means what it looks like it should mean, if you know what I mean ;-) Gary neal wrote: Oh, does that mean it *is* possible to use RewriteRules with Tomcat Standalone then? :-\ Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:04 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Yes, specific to a Tomcat issue, but the solution incorporates Apache. :) John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:54 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Oh. :( But this was actually a solution offered specific to a Tomcat issue: Issue: Unlike Apache, tomcat automatically redirects to the welcome page, rather than forwarding. In other words, to present the welcome page tomcat will literally redirect (http 302) to www.xyz.com/index.html, rather than staying at www.xyz.com. I do not want this effect as I am affraid it will have negative effects on my search engine placement. I was given the advice to use a RewriteRule to fix this problem. If this is not the solution, does anyone know what the solution is? I was told this is actually a feature of tomcat ... I call it a PAIN IN THE ASS, and a serious oversight for standalone Tomcat. Anyone know a solution? Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:16 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Beat me with a stick if I'm wrong, but RewriteRule is for Apache when using mod_rewrite, I don't think you can use it in server.xml or web.xml. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 AM To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Gary Gwin http://www.cafesoft.com * * * * The Cafesoft Access Management System, Cams, is security* * software that provides single sign-on authentication and* * centralized access control for Apache, Tomcat, and custom * * resources. * * * * -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Many people do not run Tomcat on port 80. Some do. Those who don't, run Apache on port 80 and use a connector to pass requests to Tomcat. Tomcat Stand-alone means Tomcat running on port 80, or some other port with the port number appended to the request. That is, no Apache in the mix. The suggestion to use RewriteRule only works if you use mod_rewrite, which is an Apache module. This means that Tomcat no longer listens on port 80, but on another port such as 8009, and communicates with Apache via that port. Apache listens on port 80, and in the case of the proposed solution, mod_rewrite would process the URL prior to the Tomcat connector (mod_jk or mod_jk2) getting it, which would avoid the 302 from Tomcat you are concerned about, since Tomcat would see it as a normal request, not a request that needed to be redirected or forwarded to the default welcome page. RewriteRule cannot be used in Tomcat by itself. Not in server.xml, not in web.xml. It is a mod_rewrite directive, and mod_rewrite is an Apache module. If you want to use RewriteRule and mod_rewrite, install Apache, setup mod_rewrite, setup a connector, disable the CoyoteConnector on port 80 (and 8080 if it is still enabled) in server.xml, make sure there is a CoyoteConnector listening on port 8009 (or some other port for JK/JK2) in Tomcat's server.xml, and call it good. If you do not want to use Apache in any way shape or form, then wait for or apply the patch pointed out by Tim earlier in the thread. Judging from what I read in that thread, there are very good reasons for the 302, though I didn't pursue the thread far enough back to get an idea of exactly what they are. In any case, with the patch, the existing behavior (302) is the default, and you will have to specifically configure Tomcat to behave differently. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 5:47 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat It sounds like you are saying that you must also run Apache ... that Tomcat alone is not sufficient. Is this correct? And that I would setup mod_rewrite within Apache before it gets to Tomcat? Wouldn't this then mean that you're not actually using Apache as a Standalone? Are you connecting to Tomcat via WARP? I'm confused. :( -Original Message- From: Gary Gwin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:35 PM To: Tomcat Users List Subject: Re: RewriteRules and Standalone Tomcat Yes, but your requests must be passed through Apache to Tomcat-Standalone via mod_jk. We do this on our site and it works nicely. The URL requests are processed by mod_rewrite before mod_jk forwards them to Tomcat, so the Apache behavior you desired is achieved. I don't think that Tomcat-Standalone means what it looks like it should mean, if you know what I mean ;-) Gary neal wrote: Oh, does that mean it *is* possible to use RewriteRules with Tomcat Standalone then? :-\ Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:04 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Yes, specific to a Tomcat issue, but the solution incorporates Apache. :) John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:54 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Oh. :( But this was actually a solution offered specific to a Tomcat issue: Issue: Unlike Apache, tomcat automatically redirects to the welcome page, rather than forwarding. In other words, to present the welcome page tomcat will literally redirect (http 302) to www.xyz.com/index.html, rather than staying at www.xyz.com. I do not want this effect as I am affraid it will have negative effects on my search engine placement. I was given the advice to use a RewriteRule to fix this problem. If this is not the solution, does anyone know what the solution is? I was told this is actually a feature of tomcat ... I call it a PAIN IN THE ASS, and a serious oversight for standalone Tomcat. Anyone know a solution? Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:16 AM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Beat me with a stick if I'm wrong, but RewriteRule is for Apache when using mod_rewrite, I don't think you can use it in server.xml or web.xml. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 AM To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting
RE: RewriteRules and Standalone Tomcat
John, You say there is a patch for Tomcat that will fix this redirect thing ... or at least allow me to configure it to not redirect like this? Great! Do you know specifically which patch this is? Is there any documentation that you know of regarding the patches ability to tweak this behavior? BTW - I'm currently using Tomcat 4.0.4. I wouldn't by chance already have this ability would I? I didn't see anything in the docs. Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:25 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Many people do not run Tomcat on port 80. Some do. Those who don't, run Apache on port 80 and use a connector to pass requests to Tomcat. Tomcat Stand-alone means Tomcat running on port 80, or some other port with the port number appended to the request. That is, no Apache in the mix. The suggestion to use RewriteRule only works if you use mod_rewrite, which is an Apache module. This means that Tomcat no longer listens on port 80, but on another port such as 8009, and communicates with Apache via that port. Apache listens on port 80, and in the case of the proposed solution, mod_rewrite would process the URL prior to the Tomcat connector (mod_jk or mod_jk2) getting it, which would avoid the 302 from Tomcat you are concerned about, since Tomcat would see it as a normal request, not a request that needed to be redirected or forwarded to the default welcome page. RewriteRule cannot be used in Tomcat by itself. Not in server.xml, not in web.xml. It is a mod_rewrite directive, and mod_rewrite is an Apache module. If you want to use RewriteRule and mod_rewrite, install Apache, setup mod_rewrite, setup a connector, disable the CoyoteConnector on port 80 (and 8080 if it is still enabled) in server.xml, make sure there is a CoyoteConnector listening on port 8009 (or some other port for JK/JK2) in Tomcat's server.xml, and call it good. If you do not want to use Apache in any way shape or form, then wait for or apply the patch pointed out by Tim earlier in the thread. Judging from what I read in that thread, there are very good reasons for the 302, though I didn't pursue the thread far enough back to get an idea of exactly what they are. In any case, with the patch, the existing behavior (302) is the default, and you will have to specifically configure Tomcat to behave differently. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 5:47 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat It sounds like you are saying that you must also run Apache ... that Tomcat alone is not sufficient. Is this correct? And that I would setup mod_rewrite within Apache before it gets to Tomcat? Wouldn't this then mean that you're not actually using Apache as a Standalone? Are you connecting to Tomcat via WARP? I'm confused. :( -Original Message- From: Gary Gwin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:35 PM To: Tomcat Users List Subject: Re: RewriteRules and Standalone Tomcat Yes, but your requests must be passed through Apache to Tomcat-Standalone via mod_jk. We do this on our site and it works nicely. The URL requests are processed by mod_rewrite before mod_jk forwards them to Tomcat, so the Apache behavior you desired is achieved. I don't think that Tomcat-Standalone means what it looks like it should mean, if you know what I mean ;-) Gary neal wrote: Oh, does that mean it *is* possible to use RewriteRules with Tomcat Standalone then? :-\ Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:04 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Yes, specific to a Tomcat issue, but the solution incorporates Apache. :) John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:54 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Oh. :( But this was actually a solution offered specific to a Tomcat issue: Issue: Unlike Apache, tomcat automatically redirects to the welcome page, rather than forwarding. In other words, to present the welcome page tomcat will literally redirect (http 302) to www.xyz.com/index.html, rather than staying at www.xyz.com. I do not want this effect as I am affraid it will have negative effects on my search engine placement. I was given the advice to use a RewriteRule to fix this problem. If this is not the solution, does anyone know what the solution is? I was told this is actually a feature of tomcat ... I call it a PAIN IN THE ASS, and a serious oversight for standalone Tomcat. Anyone know a solution? Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:16 AM To: 'Tomcat Users List' Subject: RE
RE: RewriteRules and Standalone Tomcat
See Tim Moore's reply to your post earlier today: http://marc.theaimsgroup.com/?l=tomcat-userm=104206237029628w=2 The discussion on the tomcat-dev list is here: http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg38868.html My point was that as you can see in the tomcat-dev discussion, Remy says I will -1 this patch unless the behavior is made optional which means there is a reason that Tomcat does the 302 and he feels strongly enough about it to register a negative vote for changing that behavior. You might want to research why that is before you decide to change it, as changing that behavior might affect something else that is more important to you than search engine placement. In any case, you can apply the patch yourself, but to do that, you will need to build Tomcat (or at least the affected parts) from source. Or wait until the next release. My guess is you will have to move up to 4.1.18 to apply the patch, though I don't have a good feel for the differences in the different versions. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:45 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat John, You say there is a patch for Tomcat that will fix this redirect thing ... or at least allow me to configure it to not redirect like this? Great! Do you know specifically which patch this is? Is there any documentation that you know of regarding the patches ability to tweak this behavior? BTW - I'm currently using Tomcat 4.0.4. I wouldn't by chance already have this ability would I? I didn't see anything in the docs. Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:25 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Many people do not run Tomcat on port 80. Some do. Those who don't, run Apache on port 80 and use a connector to pass requests to Tomcat. Tomcat Stand-alone means Tomcat running on port 80, or some other port with the port number appended to the request. That is, no Apache in the mix. The suggestion to use RewriteRule only works if you use mod_rewrite, which is an Apache module. This means that Tomcat no longer listens on port 80, but on another port such as 8009, and communicates with Apache via that port. Apache listens on port 80, and in the case of the proposed solution, mod_rewrite would process the URL prior to the Tomcat connector (mod_jk or mod_jk2) getting it, which would avoid the 302 from Tomcat you are concerned about, since Tomcat would see it as a normal request, not a request that needed to be redirected or forwarded to the default welcome page. RewriteRule cannot be used in Tomcat by itself. Not in server.xml, not in web.xml. It is a mod_rewrite directive, and mod_rewrite is an Apache module. If you want to use RewriteRule and mod_rewrite, install Apache, setup mod_rewrite, setup a connector, disable the CoyoteConnector on port 80 (and 8080 if it is still enabled) in server.xml, make sure there is a CoyoteConnector listening on port 8009 (or some other port for JK/JK2) in Tomcat's server.xml, and call it good. If you do not want to use Apache in any way shape or form, then wait for or apply the patch pointed out by Tim earlier in the thread. Judging from what I read in that thread, there are very good reasons for the 302, though I didn't pursue the thread far enough back to get an idea of exactly what they are. In any case, with the patch, the existing behavior (302) is the default, and you will have to specifically configure Tomcat to behave differently. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 5:47 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat It sounds like you are saying that you must also run Apache ... that Tomcat alone is not sufficient. Is this correct? And that I would setup mod_rewrite within Apache before it gets to Tomcat? Wouldn't this then mean that you're not actually using Apache as a Standalone? Are you connecting to Tomcat via WARP? I'm confused. :( -Original Message- From: Gary Gwin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:35 PM To: Tomcat Users List Subject: Re: RewriteRules and Standalone Tomcat Yes, but your requests must be passed through Apache to Tomcat-Standalone via mod_jk. We do this on our site and it works nicely. The URL requests are processed by mod_rewrite before mod_jk forwards them to Tomcat, so the Apache behavior you desired is achieved. I don't think that Tomcat-Standalone means what it looks like it should mean, if you know what I mean ;-) Gary neal wrote: Oh, does that mean it *is* possible to use RewriteRules with Tomcat Standalone then? :-\ Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:04 PM To: 'Tomcat Users
RE: RewriteRules and Standalone Tomcat
John, Thanks for the threads. I will certainly read them. I can't imagine why Tomcat wouldn't support this behavior unless there is another issue in Tomcat that this is covering up ... I mean this is basic http server stuff, I thought. All the same...thanks! :) Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:51 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat See Tim Moore's reply to your post earlier today: http://marc.theaimsgroup.com/?l=tomcat-userm=104206237029628w=2 The discussion on the tomcat-dev list is here: http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg38868.html My point was that as you can see in the tomcat-dev discussion, Remy says I will -1 this patch unless the behavior is made optional which means there is a reason that Tomcat does the 302 and he feels strongly enough about it to register a negative vote for changing that behavior. You might want to research why that is before you decide to change it, as changing that behavior might affect something else that is more important to you than search engine placement. In any case, you can apply the patch yourself, but to do that, you will need to build Tomcat (or at least the affected parts) from source. Or wait until the next release. My guess is you will have to move up to 4.1.18 to apply the patch, though I don't have a good feel for the differences in the different versions. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:45 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat John, You say there is a patch for Tomcat that will fix this redirect thing ... or at least allow me to configure it to not redirect like this? Great! Do you know specifically which patch this is? Is there any documentation that you know of regarding the patches ability to tweak this behavior? BTW - I'm currently using Tomcat 4.0.4. I wouldn't by chance already have this ability would I? I didn't see anything in the docs. Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:25 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Many people do not run Tomcat on port 80. Some do. Those who don't, run Apache on port 80 and use a connector to pass requests to Tomcat. Tomcat Stand-alone means Tomcat running on port 80, or some other port with the port number appended to the request. That is, no Apache in the mix. The suggestion to use RewriteRule only works if you use mod_rewrite, which is an Apache module. This means that Tomcat no longer listens on port 80, but on another port such as 8009, and communicates with Apache via that port. Apache listens on port 80, and in the case of the proposed solution, mod_rewrite would process the URL prior to the Tomcat connector (mod_jk or mod_jk2) getting it, which would avoid the 302 from Tomcat you are concerned about, since Tomcat would see it as a normal request, not a request that needed to be redirected or forwarded to the default welcome page. RewriteRule cannot be used in Tomcat by itself. Not in server.xml, not in web.xml. It is a mod_rewrite directive, and mod_rewrite is an Apache module. If you want to use RewriteRule and mod_rewrite, install Apache, setup mod_rewrite, setup a connector, disable the CoyoteConnector on port 80 (and 8080 if it is still enabled) in server.xml, make sure there is a CoyoteConnector listening on port 8009 (or some other port for JK/JK2) in Tomcat's server.xml, and call it good. If you do not want to use Apache in any way shape or form, then wait for or apply the patch pointed out by Tim earlier in the thread. Judging from what I read in that thread, there are very good reasons for the 302, though I didn't pursue the thread far enough back to get an idea of exactly what they are. In any case, with the patch, the existing behavior (302) is the default, and you will have to specifically configure Tomcat to behave differently. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 5:47 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat It sounds like you are saying that you must also run Apache ... that Tomcat alone is not sufficient. Is this correct? And that I would setup mod_rewrite within Apache before it gets to Tomcat? Wouldn't this then mean that you're not actually using Apache as a Standalone? Are you connecting to Tomcat via WARP? I'm confused. :( -Original Message- From: Gary Gwin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:35 PM To: Tomcat Users List Subject: Re: RewriteRules and Standalone Tomcat Yes, but your requests must be passed through Apache to Tomcat-Standalone via mod_jk. We do this on our site and it works nicely. The URL requests are processed
RE: RewriteRules and Standalone Tomcat
No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. I'm sure the folks on tomcat-dev could shed some more light on it. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:56 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat John, Thanks for the threads. I will certainly read them. I can't imagine why Tomcat wouldn't support this behavior unless there is another issue in Tomcat that this is covering up ... I mean this is basic http server stuff, I thought. All the same...thanks! :) Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:51 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat See Tim Moore's reply to your post earlier today: http://marc.theaimsgroup.com/?l=tomcat-userm=104206237029628w=2 The discussion on the tomcat-dev list is here: http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg38868.html My point was that as you can see in the tomcat-dev discussion, Remy says I will -1 this patch unless the behavior is made optional which means there is a reason that Tomcat does the 302 and he feels strongly enough about it to register a negative vote for changing that behavior. You might want to research why that is before you decide to change it, as changing that behavior might affect something else that is more important to you than search engine placement. In any case, you can apply the patch yourself, but to do that, you will need to build Tomcat (or at least the affected parts) from source. Or wait until the next release. My guess is you will have to move up to 4.1.18 to apply the patch, though I don't have a good feel for the differences in the different versions. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:45 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat John, You say there is a patch for Tomcat that will fix this redirect thing ... or at least allow me to configure it to not redirect like this? Great! Do you know specifically which patch this is? Is there any documentation that you know of regarding the patches ability to tweak this behavior? BTW - I'm currently using Tomcat 4.0.4. I wouldn't by chance already have this ability would I? I didn't see anything in the docs. Thanks. Neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:25 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Many people do not run Tomcat on port 80. Some do. Those who don't, run Apache on port 80 and use a connector to pass requests to Tomcat. Tomcat Stand-alone means Tomcat running on port 80, or some other port with the port number appended to the request. That is, no Apache in the mix. The suggestion to use RewriteRule only works if you use mod_rewrite, which is an Apache module. This means that Tomcat no longer listens on port 80, but on another port such as 8009, and communicates with Apache via that port. Apache listens on port 80, and in the case of the proposed solution, mod_rewrite would process the URL prior to the Tomcat connector (mod_jk or mod_jk2) getting it, which would avoid the 302 from Tomcat you are concerned about, since Tomcat would see it as a normal request, not a request that needed to be redirected or forwarded to the default welcome page. RewriteRule cannot be used in Tomcat by itself. Not in server.xml, not in web.xml. It is a mod_rewrite directive, and mod_rewrite is an Apache module. If you want to use RewriteRule and mod_rewrite, install Apache, setup mod_rewrite, setup a connector, disable the CoyoteConnector on port 80 (and 8080 if it is still enabled) in server.xml, make sure there is a CoyoteConnector listening on port 8009 (or some other port for JK/JK2) in Tomcat's server.xml, and call it good. If you do not want to use Apache in any way shape or form, then wait for or apply the patch pointed out by Tim earlier in the thread. Judging from what I read in that thread, there are very good reasons for the 302, though I didn't pursue the thread far enough back to get an idea of exactly what they are. In any case, with the patch, the existing behavior (302) is the default, and you will have to specifically configure Tomcat to behave differently. John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 5:47 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat
RE: RewriteRules and Standalone Tomcat
On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Hmm. But the fact still remains that Tomcat Standalone will not be a commercially viable http server on its own if it can't display a welcome page without redirecting to the page. Dispite all of Tomcat's other abilities, not having this ability is like shooting the standalone notion in the foot. Because of the search engine spidering implications of starting off with a 302 redirect, a Tomcat-standalone-hosted website will likley never place well in most major search engines. So aside from theory ... this is not a good feature, certainly not a viable one. :( Neal -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Neal, I told you that solution in the context of your avoiding a redirect (302), not in the context of standalone Tomcat. mod_rewrite is an Apache module. http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg38750.html is the start of a thread on patching Tomcat to do a forward instead of a redirect. Matt Parker's latest patch (not the one in the message) was approved, so long as he keeps the default to the current behavior for now. For Tomcat 5, Remy Maucherat plans to include this functionality in the mapper. --- Noel P.S. If someone needs something from me, direct e-mail might be useful if I don't reply to the list promptly. I'm swamped, and sometimes don't have time to get to the tomcat-user folder. This was my first (and probably only) pass today, and I only checked this thread because RewriteRules is one of my fun topics. -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
OK, so what's the rationalization for the 302? Can you shed some light on that? John -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Sounds like the makings of a good debate, and a classic chicken and egg problem. Does Tomcat submit to how some search engines work, even if there are reasons not to do so, or do search engines accept 302 behavior? Do ALL search engines disregard 302s? Think about it...search engines probably disregard 302s because of abusive behavior in the past from a minority of web site owners. Should that dictate the design of a major software application? John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:29 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Hmm. But the fact still remains that Tomcat Standalone will not be a commercially viable http server on its own if it can't display a welcome page without redirecting to the page. Dispite all of Tomcat's other abilities, not having this ability is like shooting the standalone notion in the foot. Because of the search engine spidering implications of starting off with a 302 redirect, a Tomcat-standalone-hosted website will likley never place well in most major search engines. So aside from theory ... this is not a good feature, certainly not a viable one. :( Neal -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 22:19:47 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat OK, so what's the rationalization for the 302? Can you shed some light on that? Consider a typical welcome page that includes: body ... img src=logo.jpg ... /body For a context path /myapp, consider what happens when I type http://www.mycompany.com/myapp; in to the browser. With a forward, the relative reference to logo.jpg gets resolved wrong (from the user's perspective) because it's the *browser* that resolves it. Want proof? Go back about three years when Tomcat 3.0 and 3.1 behaved this way, and why don't images in a welcome page work was a FAQ on TOMCAT-USER :-). Changing to the current behavior was the result of a bug report about this, that had widespread support from the user community at the time. Assuming that we can be compatible with the servlet spec language (for 2.4, that means convince the EG to clarify it this way), I think the right answer is the one proposed in the TOMCAT-DEV discussion -- if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. This still screws up relative references for people that use wierd welcome file paths like foo/bar.html, but will work for the majority -- and it seems to be the way that Apache and other web servers deal with the issue. John Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Noel, Yes that was you that gave me this solution. But know ... it was actually in the context of finding a way around this very problem which I brought up a while back. I guess the detail that I was using tomcat standalone was not understood. I appreciate the solution but yeah ... now that I'm finally getting around to putting it into action, I realized the problem. Neal -Original Message- From: Noel J. Bergman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:34 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Neal, I told you that solution in the context of your avoiding a redirect (302), not in the context of standalone Tomcat. mod_rewrite is an Apache module. http://www.mail-archive.com/tomcat-dev%40jakarta.apache.org/msg38750.html is the start of a thread on patching Tomcat to do a forward instead of a redirect. Matt Parker's latest patch (not the one in the message) was approved, so long as he keeps the default to the current behavior for now. For Tomcat 5, Remy Maucherat plans to include this functionality in the mapper. --- Noel P.S. If someone needs something from me, direct e-mail might be useful if I don't reply to the list promptly. I'm swamped, and sometimes don't have time to get to the tomcat-user folder. This was my first (and probably only) pass today, and I only checked this thread because RewriteRules is one of my fun topics. -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:51 To: Tomcat Users List Subject: RewriteRules and Standalone Tomcat What exaclty is a RewriteRule and how is it used with Standalone Tomcat? Do I define my RewriteRules somewhere in server.xml or web.xml? A couple of months ago, Noel told me how I could get Tomcat to show the content of the default welcome page without redirecting (http 302) to the file, using a RewriteRule. I took notes from that email and set it aside only to realize when I returned ... that I have no idea what to do with this info! And of course no info is available (that I could find) online or in the Tomcat manual explaining this. :( Could someone please explain how this RewriteRule would be integrated into Tomcat: RewriteRule ^/$ /index.html [L] Thanks! Neal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
So, in this scenario .. if a url without a directory is given and without a trailign slash, the redirect would not occur? That would fix this issue. I could certainly get behind that. :) if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:36 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 22:19:47 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat OK, so what's the rationalization for the 302? Can you shed some light on that? Consider a typical welcome page that includes: body ... img src=logo.jpg ... /body For a context path /myapp, consider what happens when I type http://www.mycompany.com/myapp; in to the browser. With a forward, the relative reference to logo.jpg gets resolved wrong (from the user's perspective) because it's the *browser* that resolves it. Want proof? Go back about three years when Tomcat 3.0 and 3.1 behaved this way, and why don't images in a welcome page work was a FAQ on TOMCAT-USER :-). Changing to the current behavior was the result of a bug report about this, that had widespread support from the user community at the time. Assuming that we can be compatible with the servlet spec language (for 2.4, that means convince the EG to clarify it this way), I think the right answer is the one proposed in the TOMCAT-DEV discussion -- if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. This still screws up relative references for people that use wierd welcome file paths like foo/bar.html, but will work for the majority -- and it seems to be the way that Apache and other web servers deal with the issue. John Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: RewriteRules and Standalone Tomcat
Well, a few things come to mind. 1. A comparison was made - using tomcat as a web server is like racing a mac truck. Well, for someone new to tomcat and apache (I just arrived from microsoft/iis land) the correct usage pattern was less than obvious ... I just knew that most people used tomcat/apache. I could have never anticipated this sort of issue. If this sort of issue is defended by the community (302s etc) then there should be a blatant disclaimer when downloading the standalone that it is not intended for production use. 2. As to teh chicken and egg analogy - that's a good point - does theory or an unfortunate reality dictate the direction of the product? I guess I would defer to point #1. If the product is not going to address the very real issues of production use, it should make it clear to users that it is not indended for production use. Granted the ideal is to sluff off such petty and rediculous issues put forth by the search engine defenses, but at the end of that argument the issue still exists as does the sobering fact that this will be a significant problem for anyone who chooses to deploy a commercial application using the product. neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:27 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Sounds like the makings of a good debate, and a classic chicken and egg problem. Does Tomcat submit to how some search engines work, even if there are reasons not to do so, or do search engines accept 302 behavior? Do ALL search engines disregard 302s? Think about it...search engines probably disregard 302s because of abusive behavior in the past from a minority of web site owners. Should that dictate the design of a major software application? John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:29 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Hmm. But the fact still remains that Tomcat Standalone will not be a commercially viable http server on its own if it can't display a welcome page without redirecting to the page. Dispite all of Tomcat's other abilities, not having this ability is like shooting the standalone notion in the foot. Because of the search engine spidering implications of starting off with a 302 redirect, a Tomcat-standalone-hosted website will likley never place well in most major search engines. So aside from theory ... this is not a good feature, certainly not a viable one. :( Neal -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED
RE: RewriteRules and Standalone Tomcat
Just one more thought on the matter, for me tonight: I've deployed an app using Tomcat Standalone (www.hotel.us) and while there have been several issues that were a little less than obvious, I have found a solution to every single one of them and am overall pretty satisfied with tomcat. but this one little thing would force me to have to go to apache. IMHO, it would be a shame to not be able to use the product for this one little reason. Neal -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:18 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Well, a few things come to mind. 1. A comparison was made - using tomcat as a web server is like racing a mac truck. Well, for someone new to tomcat and apache (I just arrived from microsoft/iis land) the correct usage pattern was less than obvious ... I just knew that most people used tomcat/apache. I could have never anticipated this sort of issue. If this sort of issue is defended by the community (302s etc) then there should be a blatant disclaimer when downloading the standalone that it is not intended for production use. 2. As to teh chicken and egg analogy - that's a good point - does theory or an unfortunate reality dictate the direction of the product? I guess I would defer to point #1. If the product is not going to address the very real issues of production use, it should make it clear to users that it is not indended for production use. Granted the ideal is to sluff off such petty and rediculous issues put forth by the search engine defenses, but at the end of that argument the issue still exists as does the sobering fact that this will be a significant problem for anyone who chooses to deploy a commercial application using the product. neal -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:27 PM To: 'Tomcat Users List' Subject: RE: RewriteRules and Standalone Tomcat Sounds like the makings of a good debate, and a classic chicken and egg problem. Does Tomcat submit to how some search engines work, even if there are reasons not to do so, or do search engines accept 302 behavior? Do ALL search engines disregard 302s? Think about it...search engines probably disregard 302s because of abusive behavior in the past from a minority of web site owners. Should that dictate the design of a major software application? John -Original Message- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:29 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat Hmm. But the fact still remains that Tomcat Standalone will not be a commercially viable http server on its own if it can't display a welcome page without redirecting to the page. Dispite all of Tomcat's other abilities, not having this ability is like shooting the standalone notion in the foot. Because of the search engine spidering implications of starting off with a 302 redirect, a Tomcat-standalone-hosted website will likley never place well in most major search engines. So aside from theory ... this is not a good feature, certainly not a viable one. :( Neal -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 6:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL
RE: RewriteRules and Standalone Tomcat
On Wed, 8 Jan 2003, neal wrote: Date: Wed, 8 Jan 2003 23:11:44 -0800 From: neal [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat So, in this scenario .. if a url without a directory is given and without a trailign slash, the redirect would not occur? That would fix this issue. I could certainly get behind that. :) You will change that opinion as soon as you realize that relative URIs in your welcome pages do not work any more :-). if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. This is the right answer, IMHO. It also includes the use case where you just say: http://www.mycompany.com which is (essentially) a request for the welcome file of the top-level directory of the ROOT webapp. This should be redirected to: http://www.mycompany.com/ just like Apache does it, and then forwarded to the welcome file from there, so that relative URIs still work as expected. Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:36 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 22:19:47 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat OK, so what's the rationalization for the 302? Can you shed some light on that? Consider a typical welcome page that includes: body ... img src=logo.jpg ... /body For a context path /myapp, consider what happens when I type http://www.mycompany.com/myapp; in to the browser. With a forward, the relative reference to logo.jpg gets resolved wrong (from the user's perspective) because it's the *browser* that resolves it. Want proof? Go back about three years when Tomcat 3.0 and 3.1 behaved this way, and why don't images in a welcome page work was a FAQ on TOMCAT-USER :-). Changing to the current behavior was the result of a bug report about this, that had widespread support from the user community at the time. Assuming that we can be compatible with the servlet spec language (for 2.4, that means convince the EG to clarify it this way), I think the right answer is the one proposed in the TOMCAT-DEV discussion -- if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. This still screws up relative references for people that use wierd welcome file paths like foo/bar.html, but will work for the majority -- and it seems to be the way that Apache and other web servers deal with the issue. John Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported. The minimum required version of the HTTP specification that a container must implement is HTTP/1.0. It is strongly suggested that containers implement the HTTP/1.1 specification as well. So, a servlet container (which is either Tomcat standalone or Tomcat+Apache) *must* support HTTP. I'm sure the folks on tomcat-dev could shed some more light on it. Of course, this statement does nothing to resolve the issue of what the right welcome file behavior is -- the HTTP spec is silent about that :-). John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Incoming mail
RE: RewriteRules and Standalone Tomcat
In you previous email you say: This still screws up relative references for people that use wierd welcome file paths like 'foo/bar.html', but will work for the majority. What do you mean by wierd welcome file paths. Will most relative paths still work? Is this the same sort of relative file path issues I would see if I forwarded (rather than redirect) from one JSP to another? If so, wouldn't this only be an issue if the welcome file was located somewhere other than the root of the application? Neal -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:24 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, neal wrote: Date: Wed, 8 Jan 2003 23:11:44 -0800 From: neal [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat So, in this scenario .. if a url without a directory is given and without a trailign slash, the redirect would not occur? That would fix this issue. I could certainly get behind that. :) You will change that opinion as soon as you realize that relative URIs in your welcome pages do not work any more :-). if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. This is the right answer, IMHO. It also includes the use case where you just say: http://www.mycompany.com which is (essentially) a request for the welcome file of the top-level directory of the ROOT webapp. This should be redirected to: http://www.mycompany.com/ just like Apache does it, and then forwarded to the welcome file from there, so that relative URIs still work as expected. Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:36 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 22:19:47 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat OK, so what's the rationalization for the 302? Can you shed some light on that? Consider a typical welcome page that includes: body ... img src=logo.jpg ... /body For a context path /myapp, consider what happens when I type http://www.mycompany.com/myapp; in to the browser. With a forward, the relative reference to logo.jpg gets resolved wrong (from the user's perspective) because it's the *browser* that resolves it. Want proof? Go back about three years when Tomcat 3.0 and 3.1 behaved this way, and why don't images in a welcome page work was a FAQ on TOMCAT-USER :-). Changing to the current behavior was the result of a bug report about this, that had widespread support from the user community at the time. Assuming that we can be compatible with the servlet spec language (for 2.4, that means convince the EG to clarify it this way), I think the right answer is the one proposed in the TOMCAT-DEV discussion -- if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. This still screws up relative references for people that use wierd welcome file paths like foo/bar.html, but will work for the majority -- and it seems to be the way that Apache and other web servers deal with the issue. John Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:07 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 20:33:50 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat No problem, glad to help. Remember, Tomcat is not a HTTP server. It supports HTTP as a matter of convenience. You can run Tomcat all day long without a HTTP or HTTPS connector, and as far as I know, there is nothing in the spec that says Tomcat has to meet certain requirements for HTTP or HTTPS. CoyoteConnector is HTTP/1.1 compliant, but again, that's more for convenience and compatibility than a design requirement. Auoting from Servlet Specification, Version 2.3, Section 1.2: All servlet containers must support HTTP as a protocol for requests and responses, but additional request/response based protocols (such as HTTPS (HTTP over SSL) may be supported
RE: RewriteRules and Standalone Tomcat
On Wed, 8 Jan 2003, neal wrote: Date: Wed, 8 Jan 2003 23:38:13 -0800 From: neal [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat In you previous email you say: This still screws up relative references for people that use wierd welcome file paths like 'foo/bar.html', but will work for the majority. What do you mean by wierd welcome file paths. Consider the following entry in a web.xml file: welcome-file-list welcome-filefoo/bar.html/welcome-file /welcome-file-list If we change Tomcat to forwarding to the welcome file, relative references in the bar.html page will still be broken (because they are resolved by the browser, not the server). For the typical case: welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list The proposed solution (if there's no trailing slash, redirect to the original URL + /, otherwise forward) will work, and this is by far the most common case -- but the change is still going to break existing applications for some existing users. Will most relative paths still work? Is this the same sort of relative file path issues I would see if I forwarded (rather than redirect) from one JSP to another? If so, wouldn't this only be an issue if the welcome file was located somewhere other than the root of the application? Nothing in this discussion about welcome files has *any* impact on the way that relative URLs work in non-welcome pages. Even if we change the behavior of welcome files, they will continue to work the way they work today. The key to understanding what's going on is the following: * It is the *browser* that resolves relative URIs, not the server. * The *browser* resolves relative URIs against the URL showing in the location bar (unless you use a base element, which is pretty unusual). * A redirect changes the URL showing in the location bar, but a forward does not. The current behavior (redirect always) was done because, for Tomcat 3.0 and 3.1 (which did forwarding instead), a very FAQ question on TOMCAT-USER was why can't I use a relative URI in my welcome pages. This problem, of course, went away when we switched to redirect always, and has been the way that Tomcat has worked for the last several years. Given that users are going to complain no matter what the behavior is, the right answer is to find a balance that works the best for the most. The proposed solution (redirect to a URL with a trailing slash, or forward if there already is one) seems like a good candidate to meet that goal. By the way, Tomcat gets 80,000-120,000 downloads every single month (bigger numbers in the months when there are big new releases). I guess there are at least a few people in the world who think Tomcat is still commercially viable, in spite of what you consider a fatal flaw :-). Guess I won't be trusting *your* judgement on which server to use for my next application. :-) Neal Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 11:24 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, neal wrote: Date: Wed, 8 Jan 2003 23:11:44 -0800 From: neal [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat So, in this scenario .. if a url without a directory is given and without a trailign slash, the redirect would not occur? That would fix this issue. I could certainly get behind that. :) You will change that opinion as soon as you realize that relative URIs in your welcome pages do not work any more :-). if the final element of the path is a directory (or a context) without a trailing slash, redirect to the same path with a trailing slash. But if the path is given with a trailing slash, forward to the welcome file. This is the right answer, IMHO. It also includes the use case where you just say: http://www.mycompany.com which is (essentially) a request for the welcome file of the top-level directory of the ROOT webapp. This should be redirected to: http://www.mycompany.com/ just like Apache does it, and then forwarded to the welcome file from there, so that relative URIs still work as expected. Craig -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:36 PM To: Tomcat Users List Subject: RE: RewriteRules and Standalone Tomcat On Wed, 8 Jan 2003, Turner, John wrote: Date: Wed, 8 Jan 2003 22:19:47 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: RewriteRules and Standalone Tomcat OK, so what's the rationalization for the 302? Can