Dominique Chaniat wrote:
> Hello all,
>
> At this time, I have a problem.
> The first Html page of my application is a form, with two fields (user
> and password)
>
> When the user click on the button OK, I invoke a servlet.
>
> My problem is: the user can see at the top of the browser the complete
> URL, like it:
>
> http:://host:port/servlet/myservlet?user=uuu&password=ppp
>
> I want hide user and password parameters inside this URL
>
> Can you help me
>
> Thanks in advance.
>
> Dominique
>
If you are using an HTML <form>, which it sounds like you are, you should use
METHOD="POST" in the form tag. This causes form fields to be included in the
content of the request, rather than as part of the request URI.
In your servlet, the doPost() method will be triggered, rather than doGet(), for
such a request.
Craig McClanahan
PS: There's a bug in the JSWDK 1.0 release that makes POST not work in certain
environments (for me it's a Netscape client and a Linux-based server, running
either the IBM or Blackdown JVMs). The functional workaround is to use GET -- in
which case you can still hide the URL by using one of the following approaches:
* Put your login form in a frame
* Run your app in a window that
does not have a location bar
(created with JavaScript).
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html