in reply to PERL with JSP interaction

The fact is that you don't specify at what level you want a Perl-JSP interaction.

If it's the "basic" client-server interaction, you can probably benefit from LWP::UserAgent and its powerful descendant WWW::Mechanize. Both let you build up a flexible "client-side" to interact with the JSP "server-side", even if the second is more suited to mimic a browser interaction with the server (and you get both of them, actually, because WWW::Mechanize is a subclass of LWP::UserAgent).

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Replies are listed 'Best First'.
Re^2: PERL with JSP interaction
by derby (Abbot) on Apr 10, 2007 at 13:30 UTC

    ++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