Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Adelina Fischer   on Aug 24 In Java Category.

  
Question Answered By: Elaine Stevens   on Aug 24

Did you ever get this figured out. With Leonard's
prodding, I finally got mine to work. The hitch
was that the class  was in a package of the same name
(a standard practice) and both the class name in
web.xml and the path to the class must be fully
qualified. In your case (if this is your problem)
you would use:

<servlet>
<servlet-name>a1</servlet-name>
<servlet-class>a1.a1</servlet-class>
</servlet>

and your class should be at <appBase>/classes/test/a1/a1.class

When you have everything like this, restart Tomcat
and try again. As Leonard said, with your servlet
mappin you should invoke it with:

http://localhost:8080/test/a1

If this doesn't help, we can keep plugging. I'm still
a little concerned about how that "test" subdirectory
plays out. I didn't have that complication. As you
can see, I'm no Java guru myself.

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Tomcat and Servlet Or get search suggestion and latest updates.


Tagged: