Results 1 to 4 of 4
- 10-29-2011, 04:11 AM #1
Member
- Join Date
- Aug 2011
- Posts
- 54
- Rep Power
- 0
- 11-02-2011, 04:51 PM #2
Member
- Join Date
- Aug 2011
- Posts
- 54
- Rep Power
- 0
Re: Why servlet application donot have main() method?
5o views till now but no reply.
- 11-02-2011, 06:42 PM #3
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,606
- Rep Power
- 5
Re: Why servlet application donot have main() method?
In the amount of time you have waited for an answer on this forum you could have searched the internet and found the answer a thousand times over: servlet main method
I have mentioned this in another thread of yours and will do so again here
And I will post this link one more time:You really need to learn how to ask questions the right way, and how to utilize all the resources at your disposal. Virtually all of your posts could be answered with a quick web search and a small amount of time reading.
How To Ask Questions The Smart Way
Seriously, if you want help, post a question that is answerable beyond forcing us to post links to google searches - its a waste of all of our time should you continue to do so.
- 11-02-2011, 06:53 PM #4
Member
- Join Date
- Aug 2011
- Posts
- 54
- Rep Power
- 0
Re: Why servlet application donot have main() method?
Q: What happens if I add a main method to my servlet?
A: It is possible to write a main method for a servlet, but it will not be called by the servlet container, it is not part of the servlet lifecycle process. If you invoke your servlet through the main method using the java command it will behave exactly like a standard Java class, it cannot operate as a Web application in its own right and cannot be addressed using HTTP requests. Servlets must run in a servlet container to deliver Web applications as intended.
=> I am conufesd by this answer as pe this main() and by google search I am not getting satisfactory answer.
Similar Threads
-
Running main method class from another main class
By tlrocketman in forum New To JavaReplies: 3Last Post: 12-06-2010, 08:30 AM -
Calling The main method from another method
By SwissR in forum New To JavaReplies: 3Last Post: 07-27-2010, 11:03 AM -
How to Call servlet through Java client (from main)
By akbjavauser in forum Java ServletReplies: 3Last Post: 01-20-2010, 06:15 PM -
calling method from main method
By bob_bee in forum New To JavaReplies: 4Last Post: 10-02-2009, 05:30 PM -
Invoking Servlet from SWT application
By wolve634 in forum SWT / JFaceReplies: 1Last Post: 03-30-2009, 11:35 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks