• Post Reply Bookmark Topic Watch Topic
  • New Topic

POST - Accepts Passive resource

 
Srinivasan Madhavan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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
 
Rama Ituarte
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.
 
Nicholas Cheung
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.

Nick
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!