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

General clarifications

 
Abhijit Rai
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have read contradicting views regarding few topics ,could you help me with these :
1.I have read in HFSJ that HttpSessionActivationListner is configured in DD
but in another book(by Hanumant) I have read that HttpSessionActivationListner is not configured in DD .Your views and sources please.
2.In HFSJ its stated that you may write to a ServletOutputStream obtained from Response and still forward the request ,but in Marcus it states you cant write to the outputstream and then forward .Your views and sources please.
3.Is it necessary that we have to invoke chain.doFilter() from Filters doFilter method.

Cheers !!!
[ September 12, 2008: Message edited by: Abhijit Rai ]
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answers to both these can be found easily by writing a bit of code (which will provide some useful pratice to boot). The listeners are also discussed in the FAQ: http://faq.javaranch.com/java/DeclaringListeners
 
Afzal Hossain
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Abhijit Rai,
I am found in Hanumunt book that we do not have to inform the container only the object that implements the HttpSessionBindingListener.

Thanks
Afzal
 
Abhijit Rai
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks for helping out,the answers to above are as follows
1.Both HttpSessionBindingListener and HttpActivationListener are NOT configured in the DD
2.You CAN indeed write to response and forward to another resource ,remember that previously written values will be removed from the OutputStream/Writer.
3.No its not necessary to invoke chain.doFiler() method ,it wont create an error or exception.

Cheers Abhijit,
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to read the javadocs about calling the doFilter method. Not causing an exception is not the same as not causing an effect.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic