Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

OT: Calling a Servlet from mod-Perl/Apache

by coreolyn (Parson)
on Oct 29, 2003 at 17:45 UTC ( [id://303065]=perlquestion: print w/replies, xml ) Need Help??

coreolyn has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed Monks and Monkets,

This is proabaly an apache(2) question, so I am hoping someone will endulge me. I have a mod perl site that contains a page that invokes a java servlet. Do I need to create a handler in the the httpd.conf to do this? If not what should I be doing

Braces for a slew of 'Not a Perl question responses'
  • Comment on OT: Calling a Servlet from mod-Perl/Apache

Replies are listed 'Best First'.
Re: OT: Calling a Servlet from mod-Perl/Apache
by arturo (Vicar) on Oct 29, 2003 at 20:48 UTC

    I'm not sure I get the problem. One interpretation is you have something (a static page, CGI / hander generated output) that contains a link to a URL which is in turn handled by a Java servlet ... somewhere else. In which case, a link to the URL handled by that servlet should be sufficient. Another interpretation is that you have the code for a Java servlet that you'd like to be able to execute when someone accesses a specific URL on your site.

    Apache httpd can't do this on its own. Java servlets must run inside a servlet container, such as Tomcat. Now, what you can do is set up a servlet container, and set Apache httpd to run "in front of" the servlet container, and to set up Apache to pass requests for certain URLs onto the servlet container. How to do that with Tomcat is documented on the Tomcat site (op cit.); other servlet containers do it in different ways. But a discussion of setting up Tomcat and Apache really is a topic for another site.

    HTH.

    If not P, what? Q maybe?
    "Sidney Morgenbesser"

      Sorry for the confusion.

      We're moving a static form from an IIE site on which is a submit button that calls an existing servlet. We're trying to eliminate the IIE site. I think vet's LWP call is what we're looking for. I was actually asking the question for a friend and the more I think about it, the more I'm realizing that I'm going to have to dig into the issue farther and see for myself the exact configuration he's attempting.

Re: OT: Calling a Servlet from mod-Perl/Apache
by PodMaster (Abbot) on Oct 29, 2003 at 19:41 UTC
    I have a mod perl site that contains a page that...
    So it's just a static html page? If so, perl shouldn't be involved, if not, perldoc LWP.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: OT: Calling a Servlet from mod-Perl/Apache
by vek (Prior) on Oct 29, 2003 at 21:13 UTC

    Just use LWP to call the servlet from your mod_perl handler.

    -- vek --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://303065]
Approved by BazB
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-24 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found