Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Basic Error !!

 
Kush Kush
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem :-
My web.xml is :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<web-app>
<servlet>
<servlet-name>Hello</servlet-name>
<servlet-class>Hello</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Hello</servlet-name>
<url-pattern>/Hello</url-pattern>
</servlet-mapping>
</web-app>
My FILES stored in :
/webapps/Test/WEB-INF/classes/Hello.java
/webapps/Test/WEB-INF/classes/Hello.class
When I run Tomcat i reached succesfully upto index.html when i enter my name on page then i get following error statements:-
**
1.type Status report
2.message /classes/Hello
3.description The requested resource (/classes/Hello) is not available.
**
DO ANYBODY HAVE SOLUTION ?
 
N S Raju
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Kush,
Keep ur class in a package and try ur servlet. Guess that shud do the job
bye
Surya
 
TECH ZALA
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you haven't written what to type in browser ???
you may need to write as
http://localhost:8080/Test/servlet/hello
try it........
Dreams are Wings of Success.
-----------------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic