#988 closed enhancement (fixed)
Add support for servlets in extensions
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | major | Milestone: | BASE 2.7 |
Component: | web | Version: | |
Keywords: | Cc: |
Description (last modified by )
This is "needed" by the MeV launcher. It currently uses the MevExport servlet. I guess it may continue to use that servlet, but since it is really part of the MeV functionality it would be better to move it out of the core.
Here is a rough plan:
- Extension JAR files may include a
META-INF/servlet.xml
file that defines servlets. We can use the same tags and formats as we use inweb.xml
, meaning that each servlet gets a NAME mapped to a CLASS. - In the web client core we map
*.servlet
to the already existingExtensionsServlet
. This will act as a wrapper for invoking the servlets from extensions. - Invoking the extension servlet can be done by linking to
~/NAME.servlet
where~
is the home directory of the extension. This is usually/extensions/JARFILENAME
- This request will be handled by the
ExtensionsServlet
which can extract the JARFILENAME, load the JAR, checkMETA-INF/servlet.xml
, find NAME and then create and invoke the CLASS.
Note 1. Parsing servlet.xml
is probably better done when initialising the extensions system.
Note 2. In Tomcat, most servlets are reused. I don't know if this is really necessary. It may be better to create a new instance for each request. We don't have to cache instances and we don't have to worry about classloading issues if the extension JAR file is updated.
Change History (4)
comment:1 by , 17 years ago
Description: | modified (diff) |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 17 years ago
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [4221]) References #988: Add support for servlets in extensions
The main feature is now working.