File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it possible to pass an object in a request from one app server to another?

 
Roger Graff
Ranch Hand
Posts: 112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to pass an object in a request from one app server to another?
I want a user to be able to click a link in a portal page, the portal app stores user info inside a HttpServletRequest object, and forward the request to another application running on a separate application server. Is this possible?
Thanks!
Roger
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, request forwarding is only within the same web app.
However, you can always build a query string with the user data and POST to the other app.
 
DC Dalton
Ranch Hand
Posts: 287
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A query string as Tony mentioned is probably the only way to accomplish this across multiple servers. Unfortunately if security is a concern (username, passwords etc) this is completely out of the question & is a VERY dangerous situation. Even a cookie (Yuck) would be refused due to server & browser security implementations. Also you mentioned sending an object which plain & simple will not work.
Remember the response - request object only grab / write standarized data from the headers so in fact the response object re-writes the data from the object into a form that is standarized for internet transfer (basically Strings). The request then grabs this data, parses it & puts it into what we know as the request object.
This is a tough proposal no matter how you shake it & I think unitl the "next generation" of internet protocols are created we are stuck with this.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic