Loading ...
Sorry, an error occurred while loading the content.

Re: [JPython] servlet passing.

Expand Messages
  • Chris Gokey
    I downloaded and installed Apache Tomcat into our distribution. Actually by default their installation is a stand-alone servlet containers and it was pretty
    Message 1 of 2 , Aug 20 12:23 PM
    • 0 Attachment
      I downloaded and installed Apache Tomcat into our distribution. Actually by
      default their installation is a stand-alone servlet containers and it
      was pretty easy to setup and provides servlet passing. For those interested,
      here are the steps:

      1) download http://jakarta.apache.org/downloads/binindex.html
      2) untar the distribution
      3) setenv JAVA_HOME to point to the root directory of your JDK.
      4) setenv TOMCAT_HOME to point to the root directory of your Tomcat directory.
      5) In server.xml, provide the port for listening to http requests (default is 8080)
      <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
      <Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
      <Parameter name="port" value="8081"/>
      </Connector>
      6) create a classes directory (mkdir $TOMCAT_HOME/classes) and put the PyServlet.class in it.
      I attached my own copy of PyServlet for your convenience.
      7) in web.xml, added the following servlet mapping information:
      <servlet-mapping>
      <servlet-name>
      PyServlet
      </servlet-name>
      <url-pattern>
      *.py
      </url-pattern>
      </servlet-mapping>
      7a) $TOMCAT_HOME/bin/startup.sh to startup the server
      7b) $TOMCAT_HOME/bin/shutdown.sh to shutdown the server.

      -chris

      Chris Gokey wrote:
      >
      > Hi everyone,
      >
      > I have been using a Apache JServ and I like the fact that you can
      > redirect *.py files to the PyServlet class which executes the
      > jpython script.
      >
      > In Apache JServ this is done by adding the below line to the jserv.conf
      > file.
      > ApJServAction .py /servlets/PyServlet
      >
      > I'd like to be able to do the same thing with the JSDK2.0, Is this
      > possible? Is it possible in 2.1?
      >
      > If not, can someone suggest an servlet engine that can be packaged with
      > our distribution and run under another port (not part of the web browser)
      > and have this kind of servlet redirection discussed above?
      >
      > Thanks,
      > Chris
      >
      > --
      > Christopher D. Gokey, Raytheon ITSS, NASA/GCMD
      > 18 Martin Road, Shelburne Falls, MA 01370
      > Phone: Voice (413) 625-8129 / FAX 208-248-9055
      > cgokey@... / http://gcmd.nasa.gov
      >
      > _______________________________________________
      > JPython-Interest maillist - JPython-Interest@...
      > http://www.python.org/mailman/listinfo/jpython-interest
      >
      >

      --
      Christopher D. Gokey, Raytheon ITSS, NASA/GCMD
      18 Martin Road, Shelburne Falls, MA 01370
      Phone: Voice (413) 625-8129 / FAX 208-248-9055
      cgokey@... / http://gcmd.nasa.gov
    Your message has been successfully submitted and would be delivered to recipients shortly.