Can someone PLEASE help me??

S

Steve R. Burrus

I have posted to this newsgroup before about this problem, but it sadly
remains unresolved successfully for me, and that is the proper package
structure for a servlet! Now, in the package statement at the top of the
servlet file, and assuming that I am using Tomcat for my servlet container,
should the path be something like "C:\tomcat
5.0\webapps\[context-folder]\web-inf\classes\[org\steve\burrus]" where the
compiled servlet class file "resides"??! And, re. the web.xml file, i.e.,
the web descriptor file, should the contents of the <servlet-class> tag
"mirror" the end of that path above, "org\steve\burrus" appended in front of
the servlet class name? I tell you what, I am getting quite sick and tired
of always seeing that "blasted" old 404 server error page every time that I
try/attempt to execute a Java servlet. It's "driving me nuts" when I have to
see this. I will bet that some in this group, with all that they know about
servlets, NEVER see this page. Thanx in advance for any help that I may get.
(Some day I will get it right with servlet packaging, but it is certainly
not today).
 
S

Sudsy

Steve said:
I have posted to this newsgroup before about this problem, but it sadly
remains unresolved successfully for me, and that is the proper package
structure for a servlet! Now, in the package statement at the top of the
servlet file, and assuming that I am using Tomcat for my servlet container,
should the path be something like "C:\tomcat
5.0\webapps\[context-folder]\web-inf\classes\[org\steve\burrus]" where the
compiled servlet class file "resides"??! And, re. the web.xml file, i.e.,
the web descriptor file, should the contents of the <servlet-class> tag
"mirror" the end of that path above, "org\steve\burrus" appended in front of
the servlet class name?

The root of your classes should be $APP_HOME/WEB-INF/classes. Anything
you put under that then has to be specified as being in the same package
as the directory path to the file except with periods instead of file
separators.
If you have a file named WEB-INF/classes/org/steve/burrus/MyClass.java
then the package statement should look like this:
package org.steve.burrus;
A file named WEB-INF/classes/org/steve/burrus/buttons/MyImageButton.java
would have a package statement like this:
package org.steve.burrus.buttons;
The class specifications in web.xml should also reflect the path to the
class, not the file. So you'd have somethink like this:
<servlet-class>org.steve.burrus.MyClass</servlet-class>
(note use of periods and assuming the file I mentioned previously)
 
R

Ryan Stewart

Steve R. Burrus said:
I have posted to this newsgroup before about this problem, but it sadly
remains unresolved successfully for me, and that is the proper package
structure for a servlet! Now, in the package statement at the top of the
servlet file, and assuming that I am using Tomcat for my servlet container,
should the path be something like "C:\tomcat
5.0\webapps\[context-folder]\web-inf\classes\[org\steve\burrus]" where the
compiled servlet class file "resides"??! And, re. the web.xml file, i.e.,
the web descriptor file, should the contents of the <servlet-class> tag
"mirror" the end of that path above, "org\steve\burrus" appended in front of
the servlet class name? I tell you what, I am getting quite sick and tired
of always seeing that "blasted" old 404 server error page every time that I
try/attempt to execute a Java servlet. It's "driving me nuts" when I have to
see this. I will bet that some in this group, with all that they know about
servlets, NEVER see this page. Thanx in advance for any help that I may get.
(Some day I will get it right with servlet packaging, but it is certainly
not today).
You posted this same question 25 hours earlier. Did you not see my reply to
it?
 
J

jAnO!

Steve R. Burrus said:
I have posted to this newsgroup before about this problem, but it sadly
remains unresolved successfully for me, and that is the proper package
structure for a servlet! Now, in the package statement at the top of the
servlet file, and assuming that I am using Tomcat for my servlet container,
should the path be something like "C:\tomcat
5.0\webapps\[context-folder]\web-inf\classes\[org\steve\burrus]" where the
compiled servlet class file "resides"??! And, re. the web.xml file, i.e.,
the web descriptor file, should the contents of the <servlet-class> tag
"mirror" the end of that path above, "org\steve\burrus" appended in front of
the servlet class name? I tell you what, I am getting quite sick and tired
of always seeing that "blasted" old 404 server error page every time that I
try/attempt to execute a Java servlet. It's "driving me nuts" when I have to
see this. I will bet that some in this group, with all that they know about
servlets, NEVER see this page. Thanx in advance for any help that I may get.
(Some day I will get it right with servlet packaging, but it is certainly
not today).
did you uncomment the servlet invoker and it's mapping in the web.xml in
the conf dir. of TomCat?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top