vqServer: Java servlets
Java servlets are a way to add extra functions and capabilities to web servers. They are an alternative to CGI scripts. However, servlets are more efficient and more powerful than CGI scripts. vqServer is a very efficient host for Java servlets because it is itself a Java application. Servlets run on the server (as opposed to Java applets which run in a browser). They are written in Java and conform to the servlet interface published by and available from JavaSoft. For more information about servlets, including more very good reasons why you should use them, please see the JavaSoft site. vqServer implements version 1.01 of JavaSoft's servlet specification and API with a few limitations. |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Sample servletsTwo sample servlets with source code are included with vqServer:
|
![]() ![]() ![]() ![]() ![]() |
Internal servletsSome of vqServer's functions are provided by special internal servlets which have access to the inner workings of vqServer. These are:
The vq.server.userxxx servlets are discussed on the Security extras page. |
![]() ![]() ![]() ![]() ![]() |
Calling servletsServlets are invoked by typing the appropriate alias in the Address box of a web browser or by clicking on a link on a web page (which sends an alias to the web server). vqServer expects the real name corresponding to the alias to match servletdir/package.classname (see the Aliases page). Note:
|
![]() ![]() ![]() ![]() ![]() |
Servlet initialisation parametersYou can specify initialisation parameters for a servlet by clicking on Aliases in the control centre menu and then clicking on the icon in the parameters column next to the corresponding alias (see Alias parameters). You may want to create an alias specifically for each servlet for which you need to provide initialisation parameters. The data vqServer returns to servlets in response to the getParameterNames() and getParameter() methods of the ServletConfig interface is that which is in force at the time the method is invoked, not that which was in force when the servlet is initialised and can therefore change during the life of the servlet instance. Modifying and reloading servletsvqServer checks each servlet's .class file before calling the servlet. If the .class file has changed since the servlet was last called vqServer calls the servlet's destroy() method and reloads and re-initialises the servlet. You can force vqServer to call the destroy() method and unload all active servlets by clicking Other in the control centre menu and then clicking Stop all servlets. |
![]() ![]() ![]() ![]() ![]() |
Classes and instancesYou can have more than one instance of the same servlet, each with different initialisation parameters, by using different aliases to refer to the servlet. However different instances of the same servlet do not share static class data in vqServer. |
![]() ![]() ![]() ![]() ![]() |
Security considerationsvqServer doesn't impose any restrictions whatsoever on servlet activity. For example servlets can read, write and delete any file on your computer. So make sure that any servlets you deploy on your web site come from a reputable source or are thoroughly debugged. |
![]() ![]() ![]() ![]() ![]() |
LimitationsThe following limitations apply to the vqServer version 1.03 implementation of JavaSoft's servlet API version 1.01.
vqServer version 1.03. Copyright © 1997-98 vqSoft and Steve Shering. Last updated 13 May 1998. |
![]() ![]() ![]() ![]() ![]() |