Re: access ENV variables
That did it, thanks. This is what I did: 1. In Apache httpd.conf: JkEnvVar REDIRECT_URL NULL ErrorDocument 404 /404.jsp 2. In 404.jsp: %=request.getAttribute(REDIRECT_URL)% And that way I can capture the URL the user typed. Thanks for all the help. Here goes a link I found useful: http://groups.yahoo.com/group/jetty-support/message/5239 Oreste Luci Graham Bleach wrote: On Wed, Apr 07, 2004 at 02:19:25PM -0700, Daniel Gibby wrote: Is it possible to access environment variables in tomcat that were set by apache? Which connector are you using? With mod_jk, you need to specify them in your httpd.conf: JkEnvVar ENVVAR They are then set as request attributes. G
Re: access ENV variables
Daniel Gibby wrote: Is it possible to access environment variables in tomcat that were set by apache? Specifically the REDIRECT_ * variables that are set by ErrorDocument directives? Then I can have a servlet return the correct content type. i.e. if it is a gif that has a 404 I can redirect to a graphic that says not found But if a jsp page is missing or won't compile, I can redirect to a different jsp. Hi, I'm stuck on the same problem. Any ideas? Thanks Oreste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: access ENV variables
Hi, What I want to do is to know the URI the user typed in the error page. In Apache I have the following: ErrorDocument 404 /404.jsp But in the 404.jsp when I obtain the URI I get /404.jsp, this is because Apache is doing a forward and the original URL (the one the user typed in) is lost. ¿Does anyone have an idea how to solve this problem? Thanks Oreste Shapira, Yoav wrote: Hi, I don't think so. The environment variables are in the environment and are not fed through to the JVM. Yoav Shapira Millennium Research Informatics -Original Message- From: Oreste Luci [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 12:08 PM To: Tomcat Users List Subject: Re: access ENV variables Daniel Gibby wrote: Is it possible to access environment variables in tomcat that were set by apache? Specifically the REDIRECT_ * variables that are set by ErrorDocument directives? Then I can have a servlet return the correct content type. i.e. if it is a gif that has a 404 I can redirect to a graphic that says not found But if a jsp page is missing or won't compile, I can redirect to a different jsp. Hi, I'm stuck on the same problem. Any ideas? Thanks Oreste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance problem?
Neil Aggarwal wrote: Hello: We have noticed that in our app, on occasion, a request takes an inordinately long time to execute even though it is performing a simple task. I added some tracing to the org.apache.jasper.servlet.JspServletWrapper class and get this output immediately before calling service on the servlet created from my jsp file: 10/10/2003 8:52:08.635 AM [Thread-188] Calling service on org.apache.jsp.index_jsp I had a very similar problem, and it was the GC. I'm using JRockit, and changed from -Xgc:parallel to -Xgc:gencon and that fixed it. Oreste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Performance problem?
Neil Aggarwal wrote: Oreste: I have been profiling the garbase collector in our app and it does not seem to be taking a long time to run. Do you think that could still be the problem? Thanks, Neil I think you should try changing the GC and give it a try, may be it will solve your problem. The thing is that some GC stop the world while they do the cleaning and for some applications this can be very bad. Oreste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help Creating new Host
Hi I'm using Tomcat 4.1.24 and when I create a new host with the Administration Tool I have to restart the server for the changes to take place. If I don't restart the new host is not available. Is there a way to create a new Host without restarting the server? Thanks Oreste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help Creating new Host
bernd pier wrote: so far as i know no, cause tomcat had to read the config files to make the changes. bernd Thanks for your answer. But why with the Administration Tool one can do various configurations with the server running except create a new Host? How do the Tomcat hosting sites do it? Thanks again Oreste - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]