Hi,
how do I specify the location of class in a subdirectory.
I have HelloWorldExample.class and LocalStrings.properties under
/webapps/test/WEB-INF/classes
and my web.xml looks like:
...
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>
...
It all works find I point my browser to http://localhost:8080/test/hello.
However if I move HelloWorldExample.class and LocalStrings.properties under
/webapps/test/WEB-INF/classes/hello
and change my web.xml (to reflect the move) to:
...
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>hello.HelloWorldExample</servlet-class>
</servlet>
...
pointing my browser to http://localhost:8080/test/hello
comes up with:
error 500
location/test/hello
internal error
java.lang.NoClassDefFoundError: hello/HelloWorldExample (wrong name: HelloWorldExample)
....
why? I suspect that didn't define the path in <servlet-class> correctly so what's the
right syntax?
Thanks
Dom