Andras Balogh wrote:
> p.s. Any coment is wellcomed.
There are two main differences between GET and POST:
#1. amount of data transmited with GET is limited to 4 kB,
but unlimited with POST. Some browsers have higher limit,
but you cannot rely on it.
#2. POST requests are never cached by proxies, GET requests
are cached if "Cache-control: nocache" or other HTTP header
is not used.
So for dynamically generated pages POST method is better,
for static pages GET is the only choice.
You don't need more then one servlet for one application.
Use method HttpServlet.service() instead of doGet() or doPost(),
use HttpServletRequest.getPathInfo() or existence of some parameters
to distinguish what page to show.
For example for your login page, if request parameter "user" is null,
or user session is new, show empty login form with
INPUT tags "user" and "passwd".
Then if the parameter "user" is not null, validate the user
and show another page.
Martin
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INET, a.s. Mgr. Martin Kuba
Kralovopolska 139 e-mail: [EMAIL PROTECTED]
601 12 Brno WWW: http://www.inet.cz/~makub/
Czech Republic tel: +420-5-41242414/33
--------------------------------------------------------------------
PGP fingerprint = D8 57 47 E5 36 D2 C1 A1 C3 48 B2 59 00 58 42 27
http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
--------------------------------------------------------------------
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html