Welcome to JavaRanch "Shridhar..", We don't have a lot of rules around here. In fact, the one big rule is "Be nice." But there's another one that requires you to use a display name that is either your real name or looks like a real name. Remember the naming policy that you read when you registered? Please take a minute to change your display name to show two names, preferably real names. It's all about maintaining our professional image--don't let the one-eyed moose fool you! See ya around! --- Now about your question, you can't add parameters to the request but you can add attributes (see getAttribute() and setAttribute()).
Hi Junilu Lacar, Thanks for your reply. Shridhar is my Real Name, ( my First Name..) As U said, we can setAttribute(), If i am not wrong , setAttribute() will work only with RequestDispatcher object . I cannot use RequestDispatcher object because, my applications talks to 2 other Applications , which are hosted on 2 different machines. so i want to send back the response to the calling Servlet (Client) as a key/value pair so that the client can get the values using request object.. Is there any other way by which i can send the values as key/value pairs.. Any help would be highly appreciated.. Thanks in Advance.. ~Shridhar..
Shridhar, Sorry for not being very clear the first time but our naming policy requires your publicly displayed name to have at least two parts: a first name separated by a space from a second name. We understand that in some cultures people might go by just one name which is why we also allow you to use any name that is not obviously fictitious. We think it's not too much to ask our visitors and we hope that you will be gracious enough to comply. --- Coming back to your question, when you say "my application talks to 2 other applications" do you mean that your Struts application is running on a different server than the client servlet(s)? If this is the case, the only way I can see you achieving what you want is to have your Struts action return a response which is just plain text and have your client servlet parse the response accordingly. There might be other solutions I am not aware of that somebody else can suggest.
Joined: Nov 23, 2000
Hi Junilu Lacar, You are exactly right, all the 3 are hosted on different Application servers.. As of now i am doing the same thing, i am sending text bak to the client which will parse the return value and proceed. Anyways Thanks for Ur help.. ~Shridhar..
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to send Key/Value pair bak to Servlet from Struts??