• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I clone Request Object  RSS feed

 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to clone HttpServletRequest object?
Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66152
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NO!

Never muck around with the container-provided instances. That way lies heartache and pain.

What are you really trying to accomplish?
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear for the tip.
I try to persist Request object for a thread for example.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37181
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bruce,
Odds are you thread needs some of the parameters in the request. It would be much better to save those parameters and save those for use in the thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!