Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet response can be sent to same servlet as request  RSS feed

 
Sam In
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys
Plz help me

If i want to send the response of one servlet and the same servlet handels the response also as request.

i.e if there is Form 1 in Servlet1 whose target is also servlet1 .

Is it possible

Sam
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why you wanna do this. Any rational reason for that??
 
Gerry Mason
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sam In:

i.e if there is Form 1 in Servlet1 whose target is also servlet1 .


I don't see any reason why not. It can be beneficial to have a single servlet handling all the requests for a given functional area or even an entire application. The design pattern is called 'Front Controller', I believe.

GM
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gerry Mason:


I don't see any reason why not. It can be beneficial to have a single servlet handling all the requests for a given functional area or even an entire application. The design pattern is called 'Front Controller', I believe.

GM


yes, even we can have just one servlet in command pattern as well.
but here its sort of something i couldn't get. may be you tried to say something like,

"sending request from page 1 to Servlet A and gettin response as page 2 and then sending the same response as request from page 2 to servlet A."

I think it likely happens, nothing new as such. did you mean this??
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!