|
|||||||||||
|
Re: When GET = POST?
From: Jason Childers <childers_j(at)yahoo.com>
Date: Mon Nov 11 2002 - 13:17:34 EST
Here's an excerpt from the
"Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A subclass of HttpServlet must override at least one method, usually one of these:
You can check out the javadocs here:
Most webapp functionality is almost entirely dependent on doGet and doPost, and most webapps I've seen either wrap one or the other... for example: public class MyServlet extends HTTPServlet { public void doGet (Request req, Response resp) {
// just forward this to the doPost method
this.doPost(req, resp);
} public void doPost (Request req, Response resp) { // do what you want to do with the request here
}
Note that the above signatures aren't the exact method signatures, but they indicate the idea. I'm working with the Apache Struts framework right now which hides a lot of the controller implementation from the developer. I haven't take a look to see exactly what they do behind the scenes, whether they wrap functionality or not... but I'm about to, 'cause this thread has gotten me curious. ;) Hope that gives you some idea of how J2EE apps are being developed.
Cheers,
Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 Received on Mon Nov 11 13:45:42 2002 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:44 EDT |
||||||||||
|
|||||||||||