Is it possible to take a request object
(from a posted html form) and
bounce it to something else?
For instance, we've got a form that submits to a perl
script (running
under mod_perl)
We do something w/ the form data that's posted, but we
then need
access to that posted form content elsewhere (within a
java servlet).
Can we collect that original form post within the perl
script and
redirect it back to a java servlet as, essentially, a
new request to
the servlet?
Currently we're writing the request to a file as a
name/value pair property file, and redirecting to the
servlet w/ a querystring of the file's location.
this doesn't seem like the best way however.
I've tried the following, but I seem to lose the
contents of the
request:
package MyTest;
use Apache::Constants qw(M_POST M_GET OK
SERVER_ERROR);
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use strict;
sub handler {
my $r = shift;
my $content = $r->content;
$r->method("POST");
$r->method_number(M_POST);
$r->headers_in->unset("Content-length");
$r->args($content);
$r->internal_redirect_handler("/servlet/tester");
}
1;
it'll redirect back to the servlet named "tester"
okay, but the request obj is empty once it gets back
to my servlet.
Thoughts or help greatly appreciated.
thx
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html