in reply to Re: PERL with JSP interaction
in thread PERL with JSP interaction

++polettix. This is a snippet of code I use for my perl client to get results from a tomcat server using LWP::UserAgent (but modified here to pull from the monastery).

#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $url = "http://www.perlmonks.org/?displaytype=xml;node_id=609084"; # Create a user agent my $ua = LWP::UserAgent->new; # Set the user agent string - useful for spelunking logs $ua->agent( "myapp" ); # Get the data my $res = $ua->get( $url ); # Check the outcome of the response if( $res->is_success ) { print $res->content, "\n"; }
I do this all the time ... the perl cgi-script (or mod_perl handler) will parse params, construct a url, fetch data (normally xml), and then format the fetched data.

-derby

Update: removed the extraneous use of HTTP::Request ... thanks polettix