Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call servlet from java program

 
nuthan kumar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a servlet which is deployed in weblogic server, I need to call this servlet from standalone JAVA program, can some one help in this and how to pass request,response parameters to servlets and taking back the response from servlet.

Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A better approach would be to factor the common processing out into a separate class that can be used both by the servlet and your stand-alone app.
 
nuthan kumar
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
servlet is in some other server .. which we don't have any access to modify it .. requirement is i need to call that servlet by passing a XML doc object and the servlet will send the result in xml format ..
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then you could check out the URL and URLConnection classes. Or make it easy on yourself and check out HttpClient from the Jakarta project.
 
gopinathang nathan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check this,


http://www.thescripts.com/forum/thread17880.html
 
gopinathang nathan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tried in weblogic, it works fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic