Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

call doget Method from a servlet from java class

Posted on 2011-03-23
3
Medium Priority
?
839 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 28

Accepted Solution

by:
rrz earned 2000 total points
ID: 35200411
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to implement Singleton Design Pattern in Java.

670 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