This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Static Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Static" Watch "Static" New topic
Author

Static

leela mohan
Greenhorn

Joined: Oct 31, 2006
Posts: 13
it is an one of the FAQ
servlet is not having main method so static method can call by object of class,directly, or classname
but to call this also i thing we need mainmethod so reply please
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Could you please explain in detail.


Rahul Bhattacharjee
LinkedIn - Blog
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The main method in a Java class is not for other Java components.
It's for calling a Java program from the command line.

Servlets are not called from the command line. they are invoked by the container in response to an HTTP request.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Static
 
Similar Threads
Shadowing static methods
Why redefined method is called here?
Another Static Question
Static Imports doubt!