This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 12753
    
    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: 41020
    
  43
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to access other than doGet and doPost
 
Similar Threads
HTTP method HEAD arriving at servlet as GET .....
HEAD requests.
How to deal with doHead method
How to call a doHead method inside a servlet
triggering doHead method