Knowledge base: Using Java Servlets and JSP
Servlets are a server side method of using Java to perform common cgi like functions. Although best suited to quite complex environments they can make be used for simple applications such as login forms and formmail scripts.
Current Status on Positive Internet Servers
At the moment positive are moving towards standardising on the Tomcat servlet engine, due to this the guide will lean towards the use of servlets with the Tomcat engine. The other server in use is JServ, this was originally from a similar source tree to Tomcat however development of JServ ceased almost a year ago now and therefore does not support the newer iterations of the SerlvetAPI and JSP specifications.
You will have, if servlets have been activated, a directory called WEB-INF inside your public_html directory. Inside there are three points of interest:
WEB-INF/classes All classes belong here. WEB-INF/lib Any jar files you are intending to use. WEB-INF/web.xml May or may not exist, contains preferences particular to your website. Normally servlets are callable via this style of url:
So a servlet placed here:
Is callable via:
You will have, if servlets have been activated, a directory called servlets, inside your home directory. All classes and jar files belong here and apart from that follow the same rules as tomcat above. You will find however, due to legacy reasons, the calling url is of the following style: http://yourdomain/servlets/name Jar files placed inside the servlets directory will need to be explicitly added to your properties file which is the closest thing JServ has to web.xml. This will more that likely not be editable by you and you will therefore need to contact support.
Tomcat is locally configurable via the web.xml file, the specification of which is available here:
Servlets Specification One configuration structure is worthy of special mention at the moment, the following structure:
Will need a corresponding entry in the apache configuration:
JkMount /Cocoon/* ajp13