[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: servlets : RequestDispatcher

----- Original Message -----
From: deepak yadav <deepak2000@xxxxxxxxxxxx>
Subject: [LIP] servlets : RequestDispatcher

> hi
> i am making a website using servlets(jsdk2.1) . i am sending an html page
using RequestDispatcher . my problem is that when i use doGet method the
servlets sends the page  but if i change it to doPost and call the servlet
through some form , the browser shows up "cannot find server error" .
though the window in which servletserver is running does nt show any error.
the RequestDispatcher object is not null but it is still not forwarding the

hi deepak,

    i am not very sure but this may be ur problem.....

in ur html page.... the submit button tag has a property----  method="foo"
if foo.equals(get) then the request is handled by doGet() in ur servlet and
if the foo.equals(post) then doPost() handles the request.... if u change
the doGet() method to doPost() method...... u should change ur html code

hope this helped ;-)
- chetu