• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

POST - Accepts Passive resource

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I observe something weird with the HTTP POST method. I have a html form with POST given as the method attribute in the <form> tag. The action attribute has a passive resource (say test.html) and submitting the form fetches the passive resource. I was all along thinking that the POST method was for the purpose of Active resources ( Servlets & JSPs) only. Besides I didn't find the logic in allowing a passive resource to be associated with the POST method when we have the GET method for it.

I tried this on a Tomcat container.

Thanks in advance,
Srini
 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

You would have to check the HTTP specs for the precise answer, but I can only tell what we can observe. Try it yourself: with the POST method, the URL to the destination resource, whether it is a servlet or not, remains unchanged, without any query parameters passed; the opposite happens if you use the GET method: the URL is appended of all query parameters in the browser window after the destination is loaded.
That is the main difference I see, and has no relation to the nature of the resources you use -- after all, everything ends up creating a plain HTML page. As I said, go to the specs for further info. Best regards,

Henrique
 
No more fooling around. Read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic