• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to trigger doPut and doDelete methods ?

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did u try submitting a form with method='PUT' or method='DELETE'?
Regards,
Leena
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sivasundaram ,

Thank you.
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic