Solved

call doget Method from a servlet from java class

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java Server Faces parameter pass? 6 50
how to add new optional parameter to JSP 1 42
iterator/ListIterator approach 17 27
ejb on wildfly 5 20
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

803 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