tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taral Shah" <tar...@contechsoftware.com>
Subject Re: CGIs
Date Wed, 21 Aug 2002 04:10:10 GMT
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-name>myservlet</servlet-name>
    <servlet-class>packagename.servletname</servlet-class>
  </servlet>


  <servlet-mapping>
    <servlet-name>myservlet</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-name>cgiPathPrefix</param-name>
      <param-value>WEB-INF/cgi</param-value>
Make directory under WEB-INF named cgi and put all your cgis over there.

Also another context
  <servlet-mapping>
    <servlet-name>cgi</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.
tarals@contechsoftware.com

Experience is what you get when you were expecting something else.



----- Original Message -----
From: "Jose Euclides da Silva Junior - DIGR.O"
<Jose.Euclides@rj.previdenciasocial.gov.br>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
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:rninahuanca@atos-ods.com.pe]
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:Jose.Euclides@rj.previdenciasocial.gov.br]
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:rninahuanca@atos-ods.com.pe]
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:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message