| Modifier and Type | Field and Description |
|---|---|
| protected PythonInterpreter | |
| protected static final String | |
| protected static final String | |
| protected static final String | |
| protected HttpServlet | |
| protected static final String | |
| protected static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | checkSitePackages(Properties
- The properties from which config options are found props)Check if the user has requested to initialise the jython installation "site-packages". |
| public void | destroy()
Overrides javax. Implements javax. Close down the modjy servlet. |
| public void | |
| protected void | processPthFile(PythonInterpreter
- The PythonInterpreter which will execute imports interp, PySystemState - The PySystemState whose path should be updated systemState, String - The actual path to the lib-python directory pythonLibPath, String - The PySystemState whose path should be updated pthFilename)Process an individual file .pth file in the lib-python directory |
| protected void | processPythonLib(PythonInterpreter
- The PythonInterpreter used to service requests interp, PySystemState - The PySystemState whose path should be updated systemState)Do all processing in relation to the lib-python subdirectory of WEB-INF |
| protected Properties | |
| public void | service(HttpServletRequest
- The incoming HttpServletRequest req, HttpServletResponse - The outgoing HttpServletResponse resp)Overrides javax. Actually service the incoming request. |
| protected void | setupEnvironment(PythonInterpreter
- The PythonInterpreter used to service requests interp, Properties - The properties from which config options are found props, PySystemState - The PySystemState corresponding to the interpreter servicing requests systemState)Setup the modjy environment, i.e. 1. |
| interp | back to summary |
|---|---|
| protected PythonInterpreter interp | |
| LIB_PYTHON | back to summary |
|---|---|
| protected static final String LIB_PYTHON | |
| LOAD_SITE_PACKAGES_PARAM | back to summary |
|---|---|
| protected static final String LOAD_SITE_PACKAGES_PARAM | |
| MODJY_PYTHON_CLASSNAME | back to summary |
|---|---|
| protected static final String MODJY_PYTHON_CLASSNAME | |
| modjyServlet | back to summary |
|---|---|
| protected HttpServlet modjyServlet | |
| PTH_FILE_EXTENSION | back to summary |
|---|---|
| protected static final String PTH_FILE_EXTENSION | |
| PYTHON_HOME_PARAM | back to summary |
|---|---|
| protected static final String PYTHON_HOME_PARAM | |
| ModjyJServlet | back to summary |
|---|---|
| public ModjyJServlet() | |
| checkSitePackages | back to summary |
|---|---|
| protected void checkSitePackages(Properties props) throws PyException Check if the user has requested to initialise the jython installation "site-packages". The value defaults to true, i.e. load site packages
| |
| destroy | back to summary |
|---|---|
| public void destroy() Overrides javax. Implements javax. Close down the modjy servlet.
| |
| init | back to summary |
|---|---|
| public void init() throws ServletException Overrides javax. Initialise the modjy servlet. 1. Read the configuration 2. Initialise the jython runtime 3. Setup, in relation to the J2EE servlet environment 4. Create the jython-implemented servlet 5. Initialise the jython-implemented servlet
| |
| processPthFile | back to summary |
|---|---|
| protected void processPthFile(PythonInterpreter interp, PySystemState systemState, String pythonLibPath, String pthFilename) Process an individual file .pth file in the lib-python directory
| |
| processPythonLib | back to summary |
|---|---|
| protected void processPythonLib(PythonInterpreter interp, PySystemState systemState) Do all processing in relation to the lib-python subdirectory of WEB-INF
| |
| readConfiguration | back to summary |
|---|---|
| protected Properties readConfiguration() Read configuration 1. Both context and servlet parameters are included in the set, so that the definition of some parameters (e.g python.*) can be shared between multiple WSGI servlets. 2. servlet params take precedence over context parameters | |
| service | back to summary |
|---|---|
| public void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException Overrides javax. Actually service the incoming request. Simply delegate to the jython servlet.
| |
| setupEnvironment | back to summary |
|---|---|
| protected void setupEnvironment(PythonInterpreter interp, Properties props, PySystemState systemState) throws PyException Setup the modjy environment, i.e. 1. Find the location of the modjy.jar file and add it to sys.path 2. Process the WEB-INF/lib-python directory, if it exists
| |