- public class ServletInstance
- extends klentry
Represents an instance of a servlet class.
A servlet instance is identified by
- the directory or archive from which the servlet class was read
- the fully qualified class name of the servlet class
- the port number of the server which "owns" the servlet instance
- the alias or name by which the servlet was/is invoked
The directory and class name are referred to as the servlet specification
or the translated name (because it is the result of the translation
of the requested file name) and takes the form
path/packagename.classname. See the servlets page of the main vqServer docs
for more details on servlet specifications.
Servlet instances do not have a public contructor. They are created
by Servlets.getServlet() and can be destroyed using one of the Servlets.destroy() methods.
getAlias()
- Returns the alias by which the servlet was/is invoked.
getClassName()
- Returns the fully qualified class name of the servlet.
getFileName()
- Returns the actual file name of the servlet class file,
the archive name if it was loaded from an archive
or null
if the servlet was read from the CLASSPATH.
getPath()
- Returns the directory or archive from which the servlet .class
file was read.
getPort()
- Returns the TCP/IP port number of the server that "owns" the servlet.
getServlet()
- Returns the actual servlet.
service(ServletRequest, ServletResponse)
- Invokes the servlet's service() method.
service
public void service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse rep) throws javax.servlet.ServletException, java.io.IOException
Invokes the servlet's service() method. If the servlet
implements javax.servlet.SingleThreadModel the current thread will
block until the servlet becomes free.
getPath
public java.lang.String getPath()
Returns the directory or archive from which the servlet .class
file was read.
getClassName
public java.lang.String getClassName()
Returns the fully qualified class name of the servlet.
getFileName
public java.lang.String getFileName()
Returns the actual file name of the servlet class file,
the archive name if it was loaded from an archive
or null
if the servlet was read from the CLASSPATH.
getPort
public int getPort()
Returns the TCP/IP port number of the server that "owns" the servlet.
getAlias
public java.lang.String getAlias()
Returns the alias by which the servlet was/is invoked.
getServlet
public javax.servlet.Servlet getServlet()
Returns the actual servlet.