create servelet instance from another servlet
want to create an instance of a servlet from another servlet.how do i proceed with.
# 1
Why? This just sounds like a workaround for bad design.If you want to reuse methods, then refractor to utility classes. If you actually want to invoke the servlet, then just gently do an URI request (using redirect or PostMethod).
# 2
yaha. we can directly invoke a servlet using URI. My experience says we don't need to instantiate a servlet, it will be loaded and instantiated by the servlet container once we invoke the servlet class.
actually i'm not sure abt the usage of it (creation of servlet instance from another ), as someone else asked this to me.
but is it possible to do so. how?