L
luca
I have an HashMap which contains data to fulfill requests
in my servlet. I have two alternatives:
- create a new HashMap for each request
- reuse the same HashMap, but I'll have to reset it
at the end of each request to make sure it's clean for the
next round.
which approach is more efficient?
Notes:
it's not really a servlet. It's a custom tag to be used in JSP.
Is there a method to clean a HashMap?
thanks
luca
in my servlet. I have two alternatives:
- create a new HashMap for each request
- reuse the same HashMap, but I'll have to reset it
at the end of each request to make sure it's clean for the
next round.
which approach is more efficient?
Notes:
it's not really a servlet. It's a custom tag to be used in JSP.
Is there a method to clean a HashMap?
thanks
luca