Hi,

I am trying to invoke doPost() method of a servlet from a hyper
text link in my JSP, but it is always calling doGet(). I am doing
different stuff in each method, so can't do a doPost() within
a doGet(). Is there a way I can force a method type for my servlet
when invoked from a link.
In HTML Unleased book it is mentioned that if link is with a
<FORM> </FORM> and the method defined is "POST" then doPost()
(of CGI program) would be called. But link is not exactly a form
element , so I am not sure how it would work. Anyway it is not
working for my servlet. Is there any setMethod (like request.getMethod())
which I could use.
Of course I can always create 2 different servlets. Is this the
standard/recommended practice, not to have different functionality
for doGet and doPost .
BTW, I running Websphere 2.0 server on NT.

Would appreciate any help.
Sanjay

-----
Sent using MailStart.com ( http://MailStart.Com/welcome.html )
The FREE way to access your mailbox via any web browser, anywhere!

===========================================================================
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

Reply via email to