Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes how  to  access other  than doGet  and  doPost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how  to  access other  than doGet  and  doPost" Watch "how  to  access other  than doGet  and  doPost" New topic
Author

how to access other than doGet and doPost

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

in myJsp.jsp:
i am using HEAD method
<form action="servlet" method="HEAD">

...so when i click submit button .. it have to go servlet's doHead method ..in my servlet class i define two methods called doGet and doHead but only doGet is getting called...what about doHead?

even if i give <form action="servlet" method="seetharaman">...

doGet is getting called
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
HTML only permits GET and POST in form tags.

Are you just experimenting or do you really have a need?

Bill
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
The JavaScript XMLHttpRequest object can generate requests using the other methods, as can Java client libraries like Apache HttpClient.


Ping & DNS - my free Android networking tools app
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Originally posted by William Brogden:
Are you just experimenting or do you really have a need?



experimenting .. Thanks William and ULF
 
 
subject: how to access other than doGet and doPost
 
Similar Threads
How to call a doHead method inside a servlet
HTTP method HEAD arriving at servlet as GET .....
HEAD requests.
How to deal with doHead method
triggering doHead method