Phillip,

I didn't have -wT option in my script, but thank you anyway because the
problem was in front and tailing "/"...
So, if you put "/" in front or/and in tail of

<param-value>/WEB-INF/cgi-bin/</param-value>

You receive this error.
Thank you!

/Sergeyk

(Lab Documentation -
"\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description")
Phone: 604 918-6360
Cell:  604 351-8966

> -----Original Message-----
> From: Phillip Qin [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 22, 2004 1:48 PM
> To: 'Tomcat Users List'
> Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
> exception
>
>
> CGIServlet does not support -wT in your perl script. Those
> switches are for
> debugging in perl. They are after your perl command, so, for
> example, if you
> test.pl contains
>
>  #!/bin/perl -wT
>
> Then remove the -wT.
>
> Other things to check:
>
> - in your conf/web.xml, no need to put leading /
>
>           <param-name>cgiPathPrefix</param-name>
>           <param-value>WEB-INF/cgi-bin/</param-value>
>
>
> Other than that, I can't think of any reason why you are unable to execute
> scripts using CGIServlet.
>
>
>
> -----Original Message-----
> From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
> Sent: November 22, 2004 4:40 PM
> To: Tomcat Users List
> Subject: RE: CGI Again...Servlet.service() for servlet cgi threw exception
>
>
> Phillip,
>
> Where do I have -wT???
>
> /Sergeyk
>
> (Lab Documentation -
> "\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description")
> Phone: 604 918-6360
> Cell:  604 351-8966
>
> > -----Original Message-----
> > From: Phillip Qin [mailto:[EMAIL PROTECTED]
> > Sent: Monday, November 22, 2004 1:11 PM
> > To: 'Tomcat Users List'
> > Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
> > exception
> >
> >
> > Remove -wT from your script.
> >
> > -----Original Message-----
> > From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
> > Sent: November 22, 2004 3:51 PM
> > To: Tomcat Users List
> > Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
> > exception
> >
> >
> > Hello Mark,
> >
> > Servlet mapping:
> > ---------------------
> >     <!-- The mapping for the CGI Gateway servlet -->
> >     <servlet-mapping>
> >         <servlet-name>cgi</servlet-name>
> >         <url-pattern>/cgi-bin/*</url-pattern>
> >     </servlet-mapping>
> > ---------------------
> > The URL: http://zee:8080/cgi-bin/index.pl
> >
> > Script index.pl:
> > ---------------------
> > #!/bin/perl
> >
> > print "Content type: text/html\n\n";
> > print "Hello World\n";
> > ---------------------
> >
> > Thank you!
> >
> > /Sergeyk
> >
> > (Lab Documentation -
> > "\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description")
> > Phone: 604 918-6360
> > Cell:  604 351-8966
> >
> > > -----Original Message-----
> > > From: Mark Thomas [mailto:[EMAIL PROTECTED]
> > > Sent: Sunday, November 21, 2004 9:11 AM
> > > To: 'Tomcat Users List'
> > > Subject: RE: CGI Again...Servlet.service() for servlet cgi threw
> > > exception
> > >
> > >
> > > I'll look into this but I need a bit more info:
> > >
> > > 1. What servlet mapping did you specify in web.xml?
> > > 2. What URL are you requesting?
> > >
> > > Mark
> > >
> > > > -----Original Message-----
> > > > From: Sergey Kamshilin [mailto:[EMAIL PROTECTED]
> > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: CGI Again...Servlet.service() for servlet cgi threw
> > > > exception
> > > >
> > > > Sorry guys, I gave up digging into it and haven't seen such
> > > > problems in archives...
> > > >
> > > > Tomcat 4.1.31 on Solaris.
> > > >
> > > > I enabled cgi scripting:
> > > >         changes in web.xml:
> > > > ------
> > > >     <servlet>
> > > >         <servlet-name>cgi</servlet-name>
> > > >
> > > >
> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > >         <init-param>
> > > >           <param-name>debug</param-name>
> > > >           <param-value>6</param-value>
> > > >         </init-param>
> > > >         <init-param>
> > > >           <param-name>cgiPathPrefix</param-name>
> > > >           <param-value>/WEB-INF/cgi-bin/</param-value>
> > > >         </init-param>
> > > >         <load-on-startup>5</load-on-startup>
> > > >     </servlet>
> > > > ------
> > > >         renamed servlets-cgi.jar....
> > > >
> > > > The script is
> > > > /usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
> > > > (Everything is OK, Right?)
> > > > ------------
> > > > when I try to access it I got the error:
> > > > 2004-11-19 15:53:15 cgi: findCGI: path=/index.cgi,
> > > > /usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
> > > > 2004-11-19 15:53:15 cgi: findCGI:
> > > > currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
> > > > 2004-11-19 15:53:15 cgi: findCGI:
> > > > currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
> > > > 2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at
> > > > /usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
> > > > 2004-11-19 15:53:15 StandardWrapperValve[cgi]:
> > > > Servlet.service() for servlet
> > > > cgi threw exception
> > > > java.lang.StringIndexOutOfBoundsException: String index out of
> > > > range: -2
> > > >         at java.lang.String.substring(String.java:1444)
> > > >         at java.lang.String.substring(String.java:1411)
> > > >         at
> > > > org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
> > > > (CGIServlet.ja
> > > > va:935)
> > > > ------------
> > > > Why the servlet makes exception???? What else I need to check?
> > > >
> > > > Thank you!
> > > >
> > > > /Sergeyk
> > > >
> > > > (Lab Documentation -
> > > > "\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network description")
> > > > Phone: 604 918-6360
> > > > Cell:  604 351-8966
> > > >
> > > >
> > > > ------------------------------------------------------------------
> > > > --
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> !DSPAM:41a25cc0128431408624893!
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to