call doget Method from a servlet from java class

how i can call the doget method of a servlet from a java class
LVL 1
cano63Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
CEHJCommented:
It shouldn't be called from a java class - it's called by and from the container. Why do you want to do this?
0
 
Amitkumar PSr. ConsultantCommented:
A doGet() method of servlet can not be called directly from a java class. A servlet must be deployed in a servlet container (i.e. tomcat, resin etc). A servlet container calls doGet() method once request is sent to the servlet from a browser.

Please refer :
FAQs : http://www.codestyle.org/java/servlets/faq-API.shtml
Tutorial : http://www.cs.usfca.edu/~parrt/course/601/lectures/servlets.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.