Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 3486 invoked from network); 28 Aug 2003 21:37:03 -0000 Received: from unknown (HELO prv-mail20.provo.novell.com) (137.65.81.122) by daedalus.apache.org with SMTP; 28 Aug 2003 21:37:03 -0000 Received: from INET-PRV-MTA by prv-mail20.provo.novell.com with Novell_GroupWise; Thu, 28 Aug 2003 15:36:23 -0600 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.1 Date: Thu, 28 Aug 2003 15:36:07 -0600 From: "Jeff Tulley" To: Subject: Re: First Servlet 404 error Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N It looks like you want your form action to actually be servlet/login, or maybe /onjava/servlet/login (you can use <%=request.getContextPath()%>/servlet/login in the jsp if you don't want to hardcode your context name). You have set up the mapping of /servlet/login in your web.xml, not /servlet/com.onjava.login That name is only known internally since it does not have its own servlet-mapping. Jeff Tulley (jtulley@novell.com) (801)861-5322 Novell, Inc., The Leading Provider of Net Business Solutions http://www.novell.com >>> Jim.Si@CalgaryHealthRegion.ca 8/28/03 2:36:33 PM >>> It is difficult to get my first servlet working. I got HTTP Status 404 - /onjava/servlet/com.onjava.login error. Maybe something I did not get it right. Here are the things I have. Tomcat 4.1.27 In conf/server.xml, I added the following line. In conf/web.xml, I uncomment the invoker mapping, i.e. invoker /servlet/* The I have login.jsp and welcome.jsp file under webapps/onjava directory. In login.jsp, I have the following code
......
I have login.java file with package statement on top. package com.onjava; I compiled the code and move the login.class file into webapps/onjava/Web-inf/classes/com/onjava directory. In webapps/Web-inf/web.xml file, I have the following line of code. - - login com.onjava.login - login /servlet/login I am able to get login.jsp by using http://localhost:8080/onjava/login.jsp. But when I submit it I got the HTTP status 404 - /onjava/servlet/com.onjava.login error. Anything I did wrong? Jim --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org