• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invoking another java program from a servlet?

 
Manoj Singh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all !
Is it possible to invoke a Java class(not a servlet) from within a servlet and than pass the result back to this or anyother servlet which displays it on the web
Need a reply urgently
ThanX
Manoj
 
parul patidar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>>Is it possible to invoke a Java class(not a servlet) from
>>within a servlet and than pass the result back to this
yes it is possible
or anyother servlet which displays it on the web
not sure but it should be try using URLConnection in ur Java class (not a servlet)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets have no particular restriction on what they can do - servlet applications typically consist of lots of classes, in fact it is bad form to cram all functionality into a single servlet class.
Communicating with other running Java applications is easily done with RMI.
Bill
------------------
author of:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic