Re: Problem invoking CGIs that are EXE files
I posted something on this earlier - can you get *any* cgi to work when it's included? Here's my previous post: I'm using Tomcat 4.0.3 to serve dynamic and static pages. I can get includes to work and I can get CGI's to work but I can't get included CGI's to work. you can pick your friends, you can pick your nose... Anyway, here's what works: includes on .html pages: !--#include virtual=Shared/footer-- includes on .jsp pages: %@ include file=Shared/footer % CGI that works: http://localhost/PCW/cgi-bin/test-cgi And here's what DOESN'T work (this is on a .html page) !--#include virtual=/cgi-bin/test-cgi-- !--#include virtual=/PCW/cgi-bin/test-cgi-- !--#include virtual=../../WEB-INF/cgi/test-cgi-- My Tomcat config file is completely standard - I uncommented the SSI and CGI bits and renamed the appropriate .jar files but there are no other config changes. Since both CGI's and includes work my assumption here is that the SSI servlet doesn't call the CGI servlet. In other words when I call the CGI from the URL it gets handled by the CGI servlet, and when I include it it gets handled by the SSI servlet but what I need is for the SSI servlet to call the CGI servlet which it doesn't do. It doesn't appear that any file extensions are checked by the CGI servlet, and I cannot find any code that explicitly 'allows' or 'denies' certain file extensions. As far as I can tell, the request for /cgi-bin/whatever.exe is not being handled by the CGIServlet at all. When CGIServlet is invoked, it tries to find the cgi file, and prints logs so you can tell this is happening. A request for an .exe file does not cause this log to get printed. So this tells me that the request is never getting sent to the CGIServlet, even though it matches the /cgi-bin/* pattern, which the CGIServlet is supposed to handle. --jason Turner, John wrote: .exe may not be explicitly excluded as an extension, but are other file extensions explicitly included? Like .sh, .pl, .cgi? John -Original Message- From: Jason Young [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: Problem invoking CGIs that are EXE files ...snip... Are there just some file extensions that Tomcat will not try to execute? I looked at the source code, and couldn't find any reference to .exe files that would exclude them from execution... Thanks for any help or insight into this matter! Jason Young -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat running cgi?
In theory, yes. Go to the web.xml config file (/Library/WebServer/tomcat/conf/web.xml on my machine) and you will see commented out *2* sections dealing with CGI - you also have to rename a file. It's all detailed in the web.xml file. In practice, I haven't been able to get included CGI's to work. CGI's yes, Includes, yes. But not included CGI's. I've asked around and I haven't heard of anyone who has either. Perhaps someone here can set me straight. We currently run our application on Tomcat 4, but we also are running an application (Big Brother) that needs to run CGI scripts. I want to try to drop Apache entirely since it is only there to handle the Big Brother semi-static pages. Is it possible to run these from Tomcat? By the way, I am the sys admin here, not the Tomcat developer. I don't really know too much, but I'm trying to figure it out from the documentation. Thank you, Joe -- 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: CGI FORM entry empty with TOMCAT standalone
See earlier postings on CGI's I don't think included CGI's work in Tomcat Standalone. I haven't been able to confirm this. Here's my earlier post: I'm using Tomcat 4.0.4 to serve dynamic and static pages. I can get includes to work and I can get CGI's to work but I can't get included CGI's to work. you can pick your friends, you can pick your nose... Anyway, here's what works: includes on .html pages: !--#include virtual=Shared/footer-- includes on .jsp pages: %@ include file=Shared/footer % CGI that works: http://localhost/PCW/cgi-bin/test-cgi And here's what DOESN'T work (this is on a .html page) !--#include virtual=/cgi-bin/test-cgi-- !--#include virtual=/PCW/cgi-bin/test-cgi-- !--#include virtual=../../WEB-INF/cgi/test-cgi-- My Tomcat config file is completely standard - I uncommented the SSI and CGI bits and renamed the appropriate .jar files but there are no other config changes. Since both CGI's and includes work my assumption here is that the SSI servlet doesn't call the CGI servlet. In other words when I call the CGI from the URL it gets handled by the CGI servlet, and when I include it it gets handled by the SSI servlet but what I need is for the SSI servlet to call the CGI servlet which it doesn't do. Or I could just be making all this up. Anyone want to set me straight? Or, even better, just tell me how to make it work. I've a lot of trouble using Tomcat with Apache so I'd prefer to avoid that route and go with a straight Tomcat solution if at all possible. TIA, steve Hi, I Need to integrate some current CGI with an new Java Application. So i have installed CGI in Tomcat 4.0.4 standalone and i want not use Apache. CGI is running BUT I CAN'T receive FORM DATA. ? my variable $keywords is empty. I have also tried it with an Apache Standalone and that is Ok. I suppose some problem with CGI ReadParse function. Anyone have an idea ?? Thanks Philippe -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: CGIs
Taral, do you know how to include CGI's in a page? I have all this working but I can't include CGI's. I.e. These don't work: trtd !--#include virtual=/cgi-bin/test-cgi-- !--#exec cmd=ls -- /td/tr I can call the CGI directly and it works fine: http://localhost/cgi-bin/test-cgi Hi, If you want to try CGI then try there are two options. I did same thing, I had to redirect my cgi request to servlet. I didnt use the CGI instead i made changes in web.xml like this: servlet servlet-namemyservlet/servlet-name servlet-classpackagename.servletname/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern/cgi/cgi_exe.exe/url-pattern /servlet-mapping So when ever in the url request comes for the cgi_exe as http://ip:8080/context/cgi/cgi_exe.exe It will redirect this request to my servlet. In that servlet you can write code to redirect to jsp or your business logic. If you still want to use cgi for particular reason then in tomcat 4(I have tomcat 4.0.4 and I didnt use apache) above make changes in web.xml. In that file find the word cgi and uncomment that part. Then as mentioned in it as param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value Make directory under WEB-INF named cgi and put all your cgis over there. Also another context servlet-mapping servlet-namecgi/servlet-name url-pattern/cgi-bin//url-pattern /servlet-mapping states that your cgi requests should be coming as http://ip:8080/context/cgi-bin/cgi_exe.cgi I hope this may help you. Thanks Taral Shah Software Engineer, Contech Software Ltd. [EMAIL PROTECTED] Experience is what you get when you were expecting something else. - Original Message - From: Jose Euclides da Silva Junior - DIGR.O [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 7:10 PM Subject: RES: CGIs So, I guess you could try CGIServlet from Tomcat' package. -Mensagem original- De: Rocío Ninahuanca Flores [mailto:[EMAIL PROTECTED]] Enviada em: terça-feira, 20 de agosto de 2002 10:40 Para: Tomcat Users List Assunto: RE: CGIs i mean, i want call jsps from CGIs, because my initial system is in CGIs., and i want to implement my new pages in jsp -Mensaje original- De: Jose Euclides da Silva Junior - DIGR.O [mailto:[EMAIL PROTECTED]] Enviado el: Martes, 20 de Agosto de 2002 08:24 a.m. Para: 'Tomcat Users List' Asunto: RES: CGIs Could you call your CGIs from JSP? -Mensagem original- De: Rocío Ninahuanca Flores [mailto:[EMAIL PROTECTED]] Enviada em: segunda-feira, 19 de agosto de 2002 14:13 Para: Tomcat Users List Assunto: CGIs Hello, I have an aplication in CERN server, and I want to run CGIs in Tomcat, can i do this?, my cgis were generated by C. Can I do it?, I don't want to install Apache, I just want Tomcat. It's because i have a part of an aplication in CGIs and I want to have another part in JSPs, can I do it?. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Stephan Orme Database Project Co-director Data Specialist Pesticide Action Network North America (PANNA) 49 Powell St., Suite 500 San Francisco, CA 94102 (415) 981-6205 ext. 308 (510) 845-7323 (Monday, Wednesday and Friday) (415) 981-1991 (fax) [EMAIL PROTECTED] Pesticide Action Network, advancing alternatives to pesticides worldwide Visit our Web site at http://www.panna.org - Explore our extensive resources (updated daily) - Find out about our organization and work - Join us! Need detailed information on pesticides? See our comprehensive database at http://www.pesticideinfo.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Getting mod_webapp - should I give up?
I had a very similar experience and came to the the same conclusion though I was using Tomcat 4.04. This is why I've been trying to get CGI's under Tomcat standalone to work, unfortunately I haven't been able to find out any information on this anywhere. (And if YOU know something I'd appreciate hearing of it! - see my earlier post titled: 'Do included CGI's work with Tomcat' the problem seems to be that you Tomcat doesn't process included CGI's) As far as I can see, mod_webapp was designed to be an easier to setup way of integrating apache and tomcat and it succeeds in this on windows for apache 1.3 and tomcat 4.0x. However, it will serve all content from a directory you configure it for from tomcat whereas mod_jk* will leave html, jpg, gif etc to Apache. The way round this is to have your pics and static pages in a different location that is served by Apache alone and referenced as /static/xxx or similar but this then loses the convenience of a single war file containing everything needed for the application (it can even include a mod_jk conf file which can help with mapping servlets without the need for the ugly /servlet/servlet_name of the auto-created jk conf filers of tomcat 3) Worse than the above, I have found that large requests or frequent requests or just at random cause tomcat to give an error about the client terminating or some such and hang. With mod_jk this doesn't happen (or with tomcat standalone). So, nobody can help me to build mod_webapp, and there is no rpm of it to download. Does this just mean that it can't be built? I don't remember where I read that mod_webapp was the correct way to integrate Apache2 and Tomcat4. The documentation is a bit fragmented. Is mod_jk* the true way to do this? If so, could someone give me a URL to a definitive page that says this and how to get/build it? I just want to integrate Apache2 and tomcat4, not do anything special. About a year ago I did successfully integrate Apache1 and tomcat, but I haven't worked with tomcat since then. On Tue, 2002-08-13 at 17:20, Murray Cumming wrote: OK, so if I had read README.txt properly then I would know that I need to do a cvs checkout of apr into the webapp directory. It tells me to copy and modify a build.properties.sample file, but there is no such file there, so I ignored that. As instructed, I then ran support/buildConf.sh This creates a configure script, which I am tempted to run, but the next step tells me to run ant. I did that, and I still this error: BUILD FAILED file:/home/murrayc/jakarta-tomcat-connectors-4.0.4-src/webapp/build.xml:105: Cannot find Tomcat 4.0 classes So, how do I tell it where to find these tomcat classes? I have already installed jakarta-tomcat-4 from here: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.4/rpms/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Possible bug: wrapped requests and jsp:include
See my earlier post on Tomcat Include behavior (Do Included CGI's work with Tomcat? Sent Yesterday at 1:32 pm) - I don't know if this is the same problem but it sounds a little like it, my speculation is that the include function won't process included info. Hello, I've found behaviour which might be a bug in Tomcat 4.0.4. I have a filter that wraps a request using the correct way (HttpServletRequestWrapper.) The wrapper overrides getParameter (etc.) The wrapped request then goes to a JSP, one.jsp. one.jsp includes another JSP like this: jsp:include page=/two.jsp jsp:param name=foo value=bar / /jsp:include The problem is that two.jsp only sees the parameters provided by the wrapper; it can't see the parameter foo. i.e., in two.jsp: %= request.getParameter(foo) % is null. This seems incorrect to me - surely the parameters set via jsp:param should override any set by the wrapper. I can't find anything explicit in the spec, though. It sounds like for jsp:include, Tomcat 4.0.4 is invoking methods on the internal HttpServletRequest implementation, rather than what I would expect, which is to use another wrapper around whatever HttpServletRequest object the JSP/servlet is currently processing. So is this a bug? I can send a simple webapp demonstrating this to anyone interested. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Do included CGI's work with Tomcat?
I'm using Tomcat 4.0.4 to serve dynamic and static pages. I can get includes to work and I can get CGI's to work but I can't get included CGI's to work. you can pick your friends, you can pick your nose... Anyway, here's what works: includes on .html pages: !--#include virtual=Shared/footer-- includes on .jsp pages: %@ include file=Shared/footer % CGI that works: http://localhost/PCW/cgi-bin/test-cgi And here's what DOESN'T work (this is on a .html page) !--#include virtual=/cgi-bin/test-cgi-- !--#include virtual=/PCW/cgi-bin/test-cgi-- !--#include virtual=../../WEB-INF/cgi/test-cgi-- My Tomcat config file is completely standard - I uncommented the SSI and CGI bits and renamed the appropriate .jar files but there are no other config changes. Since both CGI's and includes work my assumption here is that the SSI servlet doesn't call the CGI servlet. In other words when I call the CGI from the URL it gets handled by the CGI servlet, and when I include it it gets handled by the SSI servlet but what I need is for the SSI servlet to call the CGI servlet which it doesn't do. Or I could just be making all this up. Anyone want to set me straight? Or, even better, just tell me how to make it work. I've a lot of trouble using Tomcat with Apache so I'd prefer to avoid that route and go with a straight Tomcat solution if at all possible. TIA, steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat+CGI+SSI
I'm using Tomcat 4.0.4 to serve dynamic and static pages. I can get includes to work and I can get CGI's to work but I can't get included CGI's to work. you can pick your friends, you can pick your nose... Anyway, here's what works: includes on .html pages: !--#include virtual=Shared/footer-- includes on .jsp pages: %@ include file=Shared/footer % CGI that works: http://localhost/PCW/cgi-bin/test-cgi And here's what DOESN'T work (this is on a .html page) !--#include virtual=/cgi-bin/test-cgi-- !--#include virtual=/PCW/cgi-bin/test-cgi-- !--#include virtual=../../WEB-INF/cgi/test-cgi-- My Tomcat config file is completely standard - I uncommented the SSI and CGI bits and renamed the appropriate .jar files but there are no other config changes. Since both CGI's and includes work my assumption here is that the SSI servlet doesn't call the CGI servlet. In other words when I call the CGI from the URL it gets handled by the CGI servlet, and when I include it it gets handled by the SSI servlet but what I need is for the SSI servlet to call the CGI servlet which it doesn't do. Or I could just be making all this up. Anyone want to set me straight? Or, even better, just tell me how to make it work. I've a lot of trouble using Tomcat with Apache so I'd prefer to avoid that route and go with a straight Tomcat solution if at all possible. TIA, steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]