Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet chaining

 
vikram veera
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
I am new to servlet.I dont know ,HOW TO make servlet chaining.
I am using javawebserver2.0.I have writeen two servlet for example ser1 and ser2,In ser1 there is button if i press that
button it must invoke the ser2 servlet.How to do this? please
help me in simple coding.AND also inform tell me how to set the server for servlet chainning.
with regards,
vikram
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you are describing is not "servlet chaining" it's just the normal way you run servlets. In the HTML you generate from the first servlet, put a HREF to the the second servlet so the browser will call it when you press the button.
"Servlet Chaining" is a way of setting up the output of one servlet to be passed through another before it is sent to the browser. ALthough supported in some JavaWebServer versions it is general considered not to be a good idea. The upcoming version 2.3 of the servlet API introduces the concept of "filters" which are a much better thought-out way to do that sort of thing. Check out the latest versions of Tomcat and Resin to see their support for the draft 2.3 API
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic