hi
I am new to ServerSide programming, I want to know like how many ways can u make the servlets communicate to eachother.
if possible pls send me the sample code.
Thanks
-Arvind
-
communication between the servlets... (6 messages)
- Posted by: Arvind Sethuram
- Posted on: May 24 2001 12:59 EDT
Threaded Messages (6)
- communication between the servlets... by Race Condition on May 24 2001 15:57 EDT
- communication between the servlets... by Jason McKerr on May 25 2001 01:27 EDT
- communication between the servlets... by Jason McKerr on May 25 2001 01:28 EDT
- communication between the servlets... by Race Condition on May 25 2001 01:08 EDT
- communication between the servlets... by Jason McKerr on May 25 2001 01:27 EDT
- communication between the servlets... by Ramasubramanian Balasubramanian on May 25 2001 05:32 EDT
- communication between the servlets... by Arvind Sethuram on May 25 2001 08:47 EDT
-
communication between the servlets...[ Go to top ]
- Posted by: Race Condition
- Posted on: May 24 2001 15:57 EDT
- in response to Arvind Sethuram
If you are that new, you should read a good servlet book. -
communication between the servlets...[ Go to top ]
- Posted by: Jason McKerr
- Posted on: May 25 2001 01:27 EDT
- in response to Race Condition
Everyone, I opologize for getting off topic here for a moment....
Jeff, I normally don't get into this sort of thing.
However, I've noticed that on at least 2 occasions you've told people to read books in a pretty gruff fashion. Your implication seems to be that they shouldn't be posting these sorts of questions.
Maybe these people could be a little better about self- education. However, maybe you could take the edge off of the gruffness a little. It doesn't hurt anyone for people to come and ask questions. If you don't want to answer, then don't. This is an open community, with people in a wide range of skill levels. Just because the questions are beneath your skills, doesn't mean that they don't bear value in having them asked, answered, and answered well. If one person is asking, maybe others are too. I'm also going to post this is the general forums area, since I've seen a lot of other people make similar comments.
Again, I opologize for being off topic. But I think this is a learning and research environment to all. I'm not trying to get on anyone's case.
-Jason McKerr
-
communication between the servlets...[ Go to top ]
- Posted by: Jason McKerr
- Posted on: May 25 2001 01:28 EDT
- in response to Jason McKerr
boy I sure can't spell apologize. -
communication between the servlets...[ Go to top ]
- Posted by: Race Condition
- Posted on: May 25 2001 13:08 EDT
- in response to Jason McKerr
You are absolutely right. -
communication between the servlets...[ Go to top ]
- Posted by: Ramasubramanian Balasubramanian
- Posted on: May 25 2001 05:32 EDT
- in response to Arvind Sethuram
Hi,
one servlet can communicate with other servlet in
diferent ways.
1.A servlet can forward its request and response objects
to another servlet. In that case the control will be transfered to the distination servlet permenantly.
RequestDispatcher rd=ServletContext.getRequestDispatcher(String url)
rd.forward(request,reponse)
2.A servlet can include the output of another servlet
by using include method of RequestDispatcher.
In this case control will be transfered to the destination
servlet temporaly after excuting the dest servlet the o/p
will be included in the first servlet and excution continues
there on.
These can be used between the servlets belongs to same webapplication on the same server.
If you want to communicate with servlet of different webapplication on the same server then you can use response.sendRedirect(String url)
If you want to comunicate with servlet running on different web server then you have to use any one of these RMI, Socket programming or using URLConnection object.
Hope it will be useful.
Bye
Rama
-
communication between the servlets...[ Go to top ]
- Posted by: Arvind Sethuram
- Posted on: May 25 2001 08:47 EDT
- in response to Ramasubramanian Balasubramanian
sure i'll try to work on this.
Thanks a lot Rama!!!