• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

POST - Accepts Passive resource

Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I observe something weird with the HTTP POST method. I have a html form with POST as the method. 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 passie resource to be associated with the POST method when we have the GET method for it.

Thanks in advance,
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that the container is not smart enough to determine if the resource is an active one or passive it just follows what you specify in the <FORM method=´┐Żattribute´┐Ż>. I believe that everything defaults to a GET unless you specify differently.
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it depends on how you handle the resource.

You can use a JSP as the resource, but you have nothing to submit to it in fact (just a page transition). But you can also submit something to a HTML, which gives you static content.

Or, you can submit some form data to a JSP, which is the normal way.

For any of the combinations, all depends on your needs, the container may just give you want you are required.

Listen. That's my theme music. That's how I know I'm a super hero. That, and this tiny ad told me:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic