Solved

call doget Method from a servlet from java class

Posted on 2011-03-23
3
809 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 20

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

760 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

19 Experts available now in Live!

Get 1:1 Help Now