permaculture playing cards
The moose likes Servlets and the fly likes can't run javaservlet class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "can Watch "can New topic

can't run javaservlet class

Mellihoney Michael
Ranch Hand

Joined: Nov 27, 2002
Posts: 124

I use tomcat.and I can't call the servlet classes,can anyone help me?

a beginner in java
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The directory structure looks OK as far as it goes.
You don't give any indication of what's in your web.xml. Have you mapped your servlet(s) to a URL path? Are you using the correct mapped path in your HTML? Do you get any errors in the container log files?

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Put the classes in a package - it eliminates so many odd problems.
Mellihoney Michael
Ranch Hand

Joined: Nov 27, 2002
Posts: 124
the error message on IE is:

and the web.xml contains nothing,it is required by tomcat

[ December 29, 2003: Message edited by: Mellihoney Michael ]
sreekanth rach

Joined: Jan 02, 2003
Posts: 14
Hi Michael!
1.Open web.xml available under <Servlet Installation Directory>/conf
2.Set url-pattern to /servlet/* for servletname "Invoker" under servlet-mapping tag.
Save this file.
call in the browser :
http://ipaddress ortno/servlet/<here name of the servlet>
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858

Since there really is no JSP component to this topic, I'm moving this along to the Servlets Forum.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: can't run javaservlet class
It's not a secret anymore!