This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlet Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Problem" Watch "Servlet Problem" New topic

Servlet Problem

R Sugan
Ranch Hand

Joined: Mar 13, 2009
Posts: 48
I need to run my Servlet program continuously and without using HTTP parameters so i am using load on start up function and am include my Servlet class name into web.XML. But i can't able to open Apache-tomcat browser.Please give me any solution to solve this

Following is my code:

This is my servlet code

Ankit Garg

Joined: Aug 03, 2008
Posts: 9435

Suganya is that the complete code for the servlet?? There is no doGet or doPost method so you won't be able to access the servlet from an HTTP request i.e. through a browser. If that is not the complete code, then please provide the complete code...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
There the HttpServlet is not for.
Implement ServletContextListener.
I agree. Here's the link:
subject: Servlet Problem
It's not a secret anymore!