*
The moose likes Servlets and the fly likes can servlet be called from main() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "can servlet be called from main()" Watch "can servlet be called from main()" New topic
Author

can servlet be called from main()

Shishir malviya
Greenhorn

Joined: Jun 21, 2005
Posts: 25
Can we call a Servlet from
public static void main(String arg[])...
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
I suppose yes, but it will be very complicated, because you should write most of the functionality which provide servlet container for you. Create request/response objects, pass servletconfig, create servletcontext, at the end you will have your own servlet container


SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

Originally posted by Shishir malviya:
Can we call a Servlet from
public static void main(String arg[])...


Why not using a HTTPConnection ?


Groovy
 
 
subject: can servlet be called from main()
 
Similar Threads
servlet does not contain main()
Intercepting XML using Servlet Filter
how to start 'main' of a servlet
packaging runme.jar
Tomcat and email