Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Activation and Passivation  RSS feed

 
ashishk kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a doubt....
If for example Servlet1 is on JVM1 and Servlet2 is located on JVM2 and this is a distributed application.
Now how do I use RequestDispatcher to go from Servlet1 to Servlet2 ?
RequestDispatcher view = request.getRequestDispatcher(???);
view.forward(req,resp);
What should I put where the ??? is .
Please advise, I am not able to find an answetr to this ques.
Thanks in advance,
Ashish
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't.
Some containers will allow you to forward across contexts on the same server but not from one server to another.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ashishk kumar:
I am not able to find an answetr to this ques.

Please use real words when posting to the forums. Abbreviations such as "ques" in place of "question" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
ashishk kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ben for the quick response really appreciate it, just one last doubt...

Can you please explain this more -

"Some containers will allow you to forward across contexts on the same server but not from one server to another."

1. What do you mean by "contexts" here?
2. Does this mean that you have to deploy the full Presentation tier(JSP, SERVLETS) on ONE SINGLE JVM ??

Thanks in advance,
Please reply,
Ashish
 
ashishk kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Bear, I am a newbie and in future i will keep this in mind while posting.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.

A context is the term applied to a deployed web application, each of which possess its own servlet context and context path.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's how it's typically done.

Most containers support clustering with session replication but all of the servlets in the app would be present in each node.
 
ashishk kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys, your answers have cleared a big doubt.
I did a search on "J2EE clustering" and was able to find a lot more information in detail. Thanks Ben for the answers and introducing "clustering" term to me.
Thanks a Ton!
Ashish
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!