This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages 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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic