Re: Unable to read shell environment variables
On Fri, Feb 29, 2008 at 2:23 PM, Caldarale, Charles R [EMAIL PROTECTED] wrote: When running a Java program under Win2008, what value does the system property os.name have? windows vista What JVM version are you running? (This has the potential of being a JVM, not Tomcat, problem. The value of the aforementioned system property should tell us which.) 1.6.0_03 In the code for CGIServelet.java there is no check for windows vista I have passShellEnvironment set to true as it's required for the scripts to run. Regards, Patrick - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unable to read shell environment variables
Hi, I'm getting this error when trying to use CGI under tomcat on Windows Server 2008: javax.servlet.ServletException: Unable to read shell environment variables This line also displays: Cannot run program env: CreateProcess error=2, It looks like getShellEnvironment() is testing for specific versions of Windows and 2008 is not one of them, then defaulting to the unix call and throwing the Cannot run program env error. I don't know enough about Windows 2008 to know if it's simply going to be a matter of adding the new OS version to the if. Tomcat version is 6.0.14 Does anyone know if this has been fixed in a newer 6 release or if someone is already looking at it? Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 - includes broken
Thanks everyone. Much appreciated. I think part of my confusion was that when I create a directory to deploy into, I have to remove subdirectories from the appBase because it finds them first there before it looks in the ROOT directory I'm deploying into. This may be as intended but it was somewhat confusing when I've only ever used the old style deployment I picked up years ago. On 3/6/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Patrick Lee [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat 6 - includes broken Host name=www.something.com. debug=0 appBase=c:/wwwroot/path/ unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=. debug=0 privileged=true/ /Host This is what's not working. Additionally, If I do set the docBase to something else then it serves paths under the root relative to the appBase, not the docBase. Which is exactly what it's supposed to do. A docBase of . is never, never correct. As others have pointed out, you should stop trying to force use of the old deployment mechanism, and use the current, more robust one. 1) Remove the Context element from server.xml. 2) Remove the existing webapps/ROOT directory. 3) Deploy your app in C:/wwwroot/path/ROOT.war (or C:/wwwroot/path/ROOT, if expanded). 4) Create a META-INF/context.xml file in your webapp containing a Context element with only a privileged=true attribute (if you really need even that). You may alternatively place this Context element in conf/Catalina/www.something.com/ROOT.xml, if desired. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 - includes broken
Do you have your host appBase set to be the same as your webapp docBase? This will cause the behaviour you see here. This worked (purely by accident - it was never intended to) in previous versions due to a bug that has since been fixed. Actually, having changed that the problem persists. I either get a simple not found on the .jsp I'm trying to include or I get this. I'm not sure if there's any relevance here. java.lang.ClassNotFoundException: org.apache.jsp.index_jsp java.net.URLClassLoader$1.run(URLClassLoader.java:200) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:188) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66) org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:142) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:320) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) This is on Windows 2000. As I said, I've had 5.5.15 running fine for some time. Any ideas? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 - includes broken
Further, I am unable to set a default context effectively. Eg. Context path= docBase=/default debug=0 privileged=true/ This won't serve /something/index.jsp on the site from /default/something/index.jsp but instead from the root of the appBase (not the content docBase). The only thing it will serve from /default is files directly inside it. If however I specify a different context like this: Context path=/mycontext docBase=/default debug=0 privileged=true/ Then I can server everything up from /mycontext without not found errors on any includes and everything working fine. Of course, I don't want to serve the whole site under such a path. I'd say there's some chance I'm doing something obviously wrong here but as I said I've had no troubles until 6.0.10. Thanks. On 3/5/07, Patrick Lee [EMAIL PROTECTED] wrote: Do you have your host appBase set to be the same as your webapp docBase? This will cause the behaviour you see here. This worked (purely by accident - it was never intended to) in previous versions due to a bug that has since been fixed. Actually, having changed that the problem persists. I either get a simple not found on the .jsp I'm trying to include or I get this. I'm not sure if there's any relevance here. java.lang.ClassNotFoundException: org.apache.jsp.index_jsp java.net.URLClassLoader$1.run(URLClassLoader.java:200) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:188) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66) org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598) org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:142) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:320) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) This is on Windows 2000. As I said, I've had 5.5.15 running fine for some time. Any ideas? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 - includes broken
Apologies for all the replies but has setting a default context changed? I noticed this page linked on the Configuration Reference - http://tomcat.apache.org/tomcat-6.0-doc/config/defaultcontext.html. Unfortunately, this page gives me a 404. Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 - includes broken
The path attribute only works in server.xml. It is ignored in all other cases. Also, it is not recommended to define contexts in server.xml since you have to restart Tomcat to pick up any changes. I am putting this in server.xml inside the relevant host. Not fussed about reloads. Mostly I serve a bunch of generated JSP's from various directories. Here's the host setup: Host name=www.something.com. debug=0 appBase=c:/wwwroot/path/ unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path= docBase=. debug=0 privileged=true/ /Host This is what's not working. Additionally, If I do set the docBase to something else then it serves paths under the root relative to the appBase, not the docBase. If I leave it there with a . for the docBase then it fails on @include as it thinks / is relative to the current directory and not the docBase. Am I no longer able to configure Tomcat this way? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6 - includes broken
Hi, I'm trying to upgrade from Tomcat 5.5.15 to 6.0.10. Everything seems to have gone fine except that most of my includes are broken. I can do this: [EMAIL PROTECTED] file = something.jsp % But I can't do this: [EMAIL PROTECTED] file = /path/to/something.jsp % The latter gives me a status 500 and File not found on the include. This is independent of the content of the file I'm trying to include. Does anyone know what might have changed from 5.5.15 to 6.0.10 for htins to happen? Do I need to change some configurations? Thanks - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 - includes broken
I would assume it works in general and is specific to my instance here. Note that [EMAIL PROTECTED] file = /path/to/something.jsp % works fine if I am inside the root directory of the webapp, If however I have that include inside /somewhere/file.jsp then it always gives me a File not found. If I put /path/to/something.jsp inside the directory /somewhere/ it is then able to find the include - which looks to me like the leading slash in the include is having no effect and the path is relative to the current path and not the webapp root? On 3/4/07, Rémy Maucherat [EMAIL PROTECTED] wrote: On 3/4/07, Patrick Lee [EMAIL PROTECTED] wrote: But I can't do this: [EMAIL PROTECTED] file = /path/to/something.jsp % It works for me (this will be tested in the TCK, so there can't be any regressions on this sort of feature). The path is still relative to the webapp root, of course. Rémy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 6 - includes broken
Do you have your host appBase set to be the same as your webapp docBase? Yes, the context docBase is set at . Easy enough for me to change that and I'm guessing there are good reasons not to have a setup like that. Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
CGI environment variables
Hi, I have an issue with CGI scripts (Perl based) running under Tomcat on Windows 2000 getting URL's wrong by using backslashes instead of forward slashes. Notes: 1. I've setup CGI support as detailed in the how-to for Tomcat 5.5 2. I either have to set passShellEnvironment to true or set the systemroot env var at the top of any Perl scripts in order to be able to open a TCP/IPsocket. Otherwise I get a Can't create TCP/IP socket (10106) error. 3. As such, I have passShellEnvironment to true. 4. If I list the environment variables in Perl - for SCRIPT_NAME I get a leading forward slash whilst the remaining are backslashes. for example: SCRIPT_NAME = /cgi\path\to\script.cgi 5. Running Perl scripts on the server inserts backslashes for url's after /cgi which results in many problems. Maybe I'm missing something obvious but I've looked everywhere for some info on this and come up empty handed. Does anyone know how to fix this?