Solved

call doget Method from a servlet from java class

Posted on 2011-03-23
3
811 Views
Last Modified: 2012-05-11
how i can call the doget method of a servlet from a java class
0
Comment
Question by:cano63
3 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 35200174
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
 
LVL 21

Expert Comment

by:Amitkumar Panchal
ID: 35200406
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
 
LVL 27

Accepted Solution

by:
rrz earned 500 total points
ID: 35200411
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 68
Exception after setting jdbc session management 2 51
egit plugin on eclipse 8 28
web services creation SOAP vs REST 5 17
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now