File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to include the respose of one servlet as request to another

 
praveen kumar gowda
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys...

i have a servlet which adds two number.....now i want to send that result to the another servlet which takes the result and need to multiply with some other number

please help in this...
 
Prasad Krishnegowda
Ranch Hand
Posts: 665
4
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can send it as a request parameter..
 
Wendy Gibbons
Bartender
Posts: 1107
Eclipse IDE Oracle VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but why does it need to go to another servlet anyway?
If all your servlet does is handle the inputs and outputs from the form (like it should do), and you have other java classes doing all the actual work (like you should do),
you can just call the java classes that servlet 2 would be calling, and return from servlet 1.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic