File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 8919

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


Why not using a HTTPConnection ?


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can servlet be called from main()