G
googleRon
Gentle(wo)men,
I tried to invoke a simple servlet "Test1" which is (just for testing
purposes) part of the package "myPackage" and its class-file is in
C:\apache-tomcat-5.5.15\webapps\testApp\WEB-INF\classes\myPackage
I get from Tomcat the following error-report:
exception:
javax.servlet.ServletException: Error allocating a servlet instance
root cause:
java.lang.NoClassDefFoundError: Illegal name: myPackage/Test2
Here are some things that I did in advance to let the invocation of the
servlet works proper (as I presumed)
The first line in Test1.java is:
package myPackage;
I copied the class file Test1.class (which compiled well) from the
developing map to the map
C:\apache-tomcat-5.5.15\webapps\testApp\WEB-INF\classes\myPackage
I put the line
"C:\apache-tomcat-5.5.15\webapps\testApp\WEB-INF\classes" in the
environment variable ClassPath.
I adapted/edit web.xml bij adding the following lines:
<servlet>
<servlet-name>Test1</servlet-name>
<servlet-class>myPackage/Test2</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Test1</servlet-name>
<url-pattern>/Test1</url-pattern>
</servlet-mapping>
Still I get the error report I mentioned above.
Does someone know what causes the throw of this ServletException?
The interresting thing is that when I put the servlet (without the
package declaration!) in
the map "C:\apache-tomcat-5.5.15\webapps\testApp\WEB-INF\classes" it
works fine. No problem at all.
So I think it has something to do with the packages structure and the
environment settings.
Who can help me out please?
Thnx in advance
Ron
I tried to invoke a simple servlet "Test1" which is (just for testing
purposes) part of the package "myPackage" and its class-file is in
C:\apache-tomcat-5.5.15\webapps\testApp\WEB-INF\classes\myPackage
I get from Tomcat the following error-report:
exception:
javax.servlet.ServletException: Error allocating a servlet instance
root cause:
java.lang.NoClassDefFoundError: Illegal name: myPackage/Test2
Here are some things that I did in advance to let the invocation of the
servlet works proper (as I presumed)
The first line in Test1.java is:
package myPackage;
I copied the class file Test1.class (which compiled well) from the
developing map to the map
C:\apache-tomcat-5.5.15\webapps\testApp\WEB-INF\classes\myPackage
I put the line
"C:\apache-tomcat-5.5.15\webapps\testApp\WEB-INF\classes" in the
environment variable ClassPath.
I adapted/edit web.xml bij adding the following lines:
<servlet>
<servlet-name>Test1</servlet-name>
<servlet-class>myPackage/Test2</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Test1</servlet-name>
<url-pattern>/Test1</url-pattern>
</servlet-mapping>
Still I get the error report I mentioned above.
Does someone know what causes the throw of this ServletException?
The interresting thing is that when I put the servlet (without the
package declaration!) in
the map "C:\apache-tomcat-5.5.15\webapps\testApp\WEB-INF\classes" it
works fine. No problem at all.
So I think it has something to do with the packages structure and the
environment settings.
Who can help me out please?
Thnx in advance
Ron