IPP Mail Archive: IPP>PRO new information on POST versus PRINT method

IPP>PRO new information on POST versus PRINT method

Robert Herriot (robert.herriot@Eng.Sun.COM)
Fri, 13 Mar 1998 12:34:19 -0800

I have now discovered that IPP implementation using Java servlets can be
implemented with either POST or PRINT or any collection of methods we might
want, and it doesn't really matter because of the excellent design of Java
Servlets.

So, I no longer have objections about a PRINT method based on lack of
support by the webserver. Now it is more of a network issue and I don't
have enough information to know which is better in that environment.

In case you care about the details of servlets, here they are:

When a servlet Foo is first instantiated its 'init' method is called. It is
instantiated when the web server starts or when the web server detects that
the servlet 'Foo.class' file is new. In the later case, the web server
calls the 'destroy' method in the running 'Foo' servlet if one is running.

Each time the web server receives a request for '/servlet/Foo', it calls
the 'service' method with two parameters: a request and response object.
Each 'service' call is a separate thread so the servlet can be processing
more than one request. If the servlet overrides the 'service' method, it
can process requests for any method, and it can determine the method via
the request object with the 'getMethod' method. If the servlet doesn't
override the 'service' method, the superclass 'service' method calls
'doGet' for GET, 'doPost' for POST, etc, and it returns an error for the
nonstandard methods. If the servlet overrides 'doGet', it can process GET
methods. If the servlet overrides 'doPost', it can process POST methods.

Bob Herriot