This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call a servlet from a Java Script function

 
indu yeturu
Ranch Hand
Posts: 123
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, can you please tell me how to call a servlet from JavaScript function..
thanks
indu
[ August 31, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64183
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a GET or a POST?

For the former, load the URL of the servlet using:


for a POST, cause a form with a method of "post" to be submitted.

Or use Ajax.
[ August 31, 2008: Message edited by: Bear Bibeault ]
 
indu yeturu
Ranch Hand
Posts: 123
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JS function can able to call doGet() of Servlet, but not calling doPost() . I added <form method="post">.
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic