aspose file tools*
The moose likes Servlets and the fly likes is this web.xml correct  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "is this web.xml correct  " Watch "is this web.xml correct  " New topic
Author

is this web.xml correct

Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
<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

SCJO, SCJD, SCWCD, I-Net+, A+, Network+, MCSD, MCDBA, MCP, MCT
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
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:


Java Resources at www.wbrogden.com
Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
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

Joined: Feb 20, 2001
Posts: 3695

see my reply here:
http://www.javaranch.com/ubb/Forum7/HTML/006859.html
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is this web.xml correct
 
Similar Threads
Error 404 with servlet in Tomcat
Servlets 404 error
help me deploy my webapp
Question getServletContext().getRequestDispatcher("/foo.jsp").forward(req, res); I
404 error on calling my servlet