Hi Prasad,
   The solution is not  yet clear for me .
   My problem is the following :
  I have 2 servlets (say "servlet1" and "sevelet2") :
  In servlet1 i define a FORM with METHOD=POST ,this form let user to login
(give name and password).
 This task is OK  "servlet1" displays th form and user can type in
information .
  When user click OK button this transfers control to "servlet2"
  So action associeted with the POST form is "servlet2"  and here the
problem :each time we click OK
   control is transferred to "servlet2" but "servlet2" results in page
reporting that thre is a problem encountred by
  the browser .(HTTP 405 ...)
  Notice that wen invokek separetly "servlet2" dose not return this message
but i works with null arguments (name and pssword supposed to be passed by
"servlet1") .
If i replace doPost with doGet in "servlet2" and Method=GET in "servlet1" ,
all things work correctly except the
problem of displaying what user types in in ULR window.

Please explaine the line :
file://add doPost also

What dose it mean what is its Syntax .

Thanks a lot  for all efforts


----- Message d'origine -----
De : prasad charasala <[EMAIL PROTECTED]>
A : <[EMAIL PROTECTED]>
Envoyé : jeudi 16 septembre 1999 17:29
Objet : Re: Still having Problem with POST FORM


> > Hi All ,
> > I Still  have problem with servlet invoked as action
> > in a  <FORM
> > METHOD=POST....>
> > If I replace POST  by  GET  I am OK but the problem
> > is that if am filling
> > secret data such as password
> > fields all i am typing is browsed in the URL  window
> > of that Servlet .
> > If i put POST instead of GET  i get message HTTP 405
> > "page cannot be
> > printed"
>
>
>
> Hi
>   Whenever you are sending secret, valuable information you need to use
> POST method only, so in the servlet also you must use doPost() method
> only.
> If you want your servlet must handle doPost() and doGet() here is a
> trick.
>
>  public void doGet(HttpServletRequest req, HttpServletResponse res)
> .....
> {
> .......body goes here....
> }
>  file://add doPost also
> public void doPost(HttpServletRequest req, HttpServletResponse res)
> {
>   doGet(req, res);
> }
>
> this will solve your problem.
>
> Prasad
> [EMAIL PROTECTED]
>
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com
>
>
___________________________________________________________________________
> 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

___________________________________________________________________________
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

Reply via email to