Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is this web.xml correct

 
Ray Smilgius
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<web-app><servlet><servlet-name>serve</servlet-name><servlet-class>pleasework</servlet-class></servlet></web-app>
here is the path of the web.xml
C:\jakarta-tomcat-4.0\webapps\FortKnox\WEB_INF
then my classes is this path
C:\jakarta-tomcat-4.0\webapps\FortKnox\WEB_INF\classes
name pleasework.class
in the browser i type::
http://rsmilgius/FortKnox/index.jsp // this works fine
however calling the servlet error 404......
http://rsmilgius/FortKnox/serve/
is this correct I have all my classes wrote but cant get this path setting correct
Thanks in advance Ray
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have an entry in TOMCAT_HOME/conf/server.xml for the FortKnox web application? If not, Tomcat never looks at your web.xml.
Bill

------------------
author of:
 
Ray Smilgius
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes sir I do,
as follows
<Context path="/FortKnox" docBase="FortKnox" debug="0" reloadable="true"/>
http://rsmilgius/FortKnox/index.jsp
//this is ok in the browser
I run this at dos:::
C:\>javap -classpath FortKnox/WEB-INF/classes pleasework
Class 'pleasework' not found
Any Ideas greatly appreciated.
[This message has been edited by Ray Smilgius (edited November 19, 2001).]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see my reply here:
http://www.javaranch.com/ubb/Forum7/HTML/006859.html
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you have no doubt already figured out, the reason that the following does not work:
"I run this at dos:::
C:\>javap -classpath FortKnox/WEB-INF/classes pleasework
Class 'pleasework' not found"
is that you didn't specify the class file right. javap wants to see the complete path to pleasework and should work with your existing classpath.
Remember that the aliases that Tomcat uses to find web server files are completely different from the "real" directory structure.
You might want to specify debug="1" and include a logger in your <Context tag
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic