Hi,

I've no manged to get things working with Tomcat 5.5.20.
I've changed my servlet filter so it appends the parameter to the query string 
as proposed.

As I now understand it the standard CGIServlet will not work if there is a 
servlet-filter that do getParameters() and adds a new parameter as my filter 
did.

Attached is a CGIServlet that work with my old filter and also with multipart 
forms.
It has other drawbacks like reading the whole multipart into memory.

Feel free to use the code or ideas in the attachment.

Regards
Gunnar


> -----Ursprungligt meddelande-----
> Från: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Skickat: den 19 oktober 2006 15:08
> Till: users@tomcat.apache.org
> Kopia: [EMAIL PROTECTED]; Bengtsson Henrik
> Ämne: RE: Problem with filter and calling Perl-script with 
> Tomcat 5.5.20
> 
> Hi Mark,
> 
> You are absolutly right.
> 
> I changed my filter and the CGI.pm as you proposed and it now 
> works for POST and GET but NOT with multipart forms.
> 
> I've looked into the CGI.pm to see if there was a similar 
> change for multpart but I have not found any and my perl 
> knowledge is not good enough.
> 
> Any one out there who knows how to do this?
> 
> Regards
> Gunnar
> 
> 
> > -----Ursprungligt meddelande-----
> > Från: Mark Thomas [mailto:[EMAIL PROTECTED]
> > Skickat: den 19 oktober 2006 13:24
> > Till: Tomcat Users List
> > Ämne: Re: SV: Problem with filter and calling Perl-script 
> with Tomcat 
> > 5.5.20
> > 
> > [EMAIL PROTECTED] wrote:
> > > Hi,
> > > 
> > > That is odd because I have the following problems:
> > > 
> > > 1) When I post an ordinary form, not a multipart, no
> > parameters will be sent to the Perl script.
> > 
> > And light dawns. Sorry - should have spotted this sooner. You call
> > getParameterMap() in your filter which will drain stdin so 
> there won't 
> > be any parameters there for the CGI script to read from the POST.
> > 
> > A safer bet would be to add your parameter to the end of the URL as 
> > part of the query string. I did read 
> > http://users.easystreet.com/ovid/cgi_course/lessons/lesson_two.html
> > that suggested you would need to tweak your Perl implementation to 
> > combine parameters from POST and GET.
> > 
> > Mark
> > 
> > 
> ---------------------------------------------------------------------
> > 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]
> 
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to