This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to trigger doPut and doDelete methods ?

 
Raju Sri
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I just want to test the functionality of doPut and doDelete methods in Simple Hello Servlet.How can I test this ?. I know doPut() is used to place some resource(files) on the server and doDelete() is to delete some resource(files) on server. Is there any way to test these methods ?


Regards
Raju
 
Leena Diwan
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did u try submitting a form with method='PUT' or method='DELETE'?
Regards,
Leena
 
Sivasundaram Umapathy
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "POST" and "GET" are the only valid methods for an HTML form. So you cannot test the other HTTP methods with HTML forms.

If you have plenty of time, you could try implementing a HTTP client using socket connections. But if you need it faster, you can try Apache HttpClient to simulate "PUT" and "DELETE"

Check the PUT example and DELETE example pages for further instructions

HTH
 
Raju Sri
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sivasundaram ,

Thank you.
 
Anupama Ponnapalli
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Siva,

This is exactly what I was looking for! Thanks for your valuable post.

- Anu
[ September 07, 2006: Message edited by: Anupama Ponnapalli ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic