• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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 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,
Srini
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

Nick
 
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic