if we can call the servelt for a main() method... then we need to call the servlet's lifecycle methods in the main method, but will the container create the request and response objects?? or do we have to create those??
SCJP 1.4<br /> <br />May God give me the serenity to accept things that I cannot change, <br />the courage to change the things I can, and the wisdom to know the difference.
posted 11 years ago
u can "instantiate" u're servlet class from some app, but u wont get the "servletness",it would be POJO but not real servlet(if it compiles).
But what u can do in u're main is: make a socet or so and then call the servlet via GET througth HTTP. But u still need to have de deployed servlet on the server to which u r callin. [ September 23, 2005: Message edited by: Ner min ]
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads