Now my web.xml looks like this :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>UploadTest</servlet-name>
<servlet-class>UploadTest</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UploadTest</servlet-name>
<url-pattern>UploadTest</url-pattern>
</servlet-mapping>
</web-app>
But I got this error in line 15:
Starting service Tomcat-Standalone
Apache Tomcat/4.0-b1
ERROR reading java.io.FileInputStream@7ec107
At Line 15 /web-app/servlet-mapping/
Starting service Tomcat-Apache
Apache Tomcat/4.0-b1
And the servlet UploadTest is in :
tomcat\webapps\myapp\WEB-INF\classes\UplaodTest.class
tomcat\webapps\myapp\WEB-INF\classes\com
UploadTest.java looks like this :
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.oreilly.servlet.MultipartRequest;
public class UploadTest extends HttpServlet {
......
.......
}
Thanks lot
>From: Robert Nelson <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: new bie servelt, web.xml ??
>Date: Mon, 26 Feb 2001 09:30:24 -0500
>
>You have the servlet mapping defined, which maps
>a URL to a servlet, but you don't have the actual servlet
>declared (which actually associates a class file with the servlet name).
>You should have the following text block
>in your web.xml file as well.
>
><web-app>
><servlet>
><servlet-name> SomeName </servlet-name>
><servlet-class> fully.qualified.ServletName </servlet-class>
></servlet>
>...
></web-app>
>
>------Original Message------
>From: sufi malak <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Sent: February 26, 2001 2:09:28 PM GMT
>Subject: new bie servelt, web.xml ??
>
>
>Hi, I am new to servlet, I am trying to use the Upload servlet from Java
>Servlet Programming book, Jason Hunter, this is whay I have :
>tomcat\webapps\myapp\WEB-INF\classes\UploadTest.class
>tomcat\webapps\myapp\WEB-INF\web.xml ???
>I created this web.xml :
><?xml version="1.0" encoding="ISO-8859-1"?>
>
><!DOCTYPE web-app
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
>
><web-app>
><!-- The mapping for the default servlet -->
><servlet-mapping>
><servlet-name>UploadTest</servlet-name>
><url-pattern>/UploadTest</url-pattern>
></servlet-mapping>
></web-app>
>
>But when I started Tomcat I got this :
>Starting service Tomcat-Standalone
>Apache Tomcat/4.0-b1
>ERROR reading java.io.FileInputStream@7ec107
>At Line 12 /web-app/servlet-mapping/
>Starting service Tomcat-Apache
>Apache Tomcat/4.0-b1
>
>And this is how I am calling the servlet( the same from the book)
><FORM ACTION="/servlet/UploadTest" ENCTYPE="multipart/form-data"
>METHOD=POST>
>What is the image you want to upload? <INPUT TYPE=FILE NAME=file>
><BR>
><INPUT TYPE=SUBMIT>
></FORM>
>
>What's wrong with my web.xml ??
>Thanks
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>http://java.sun.com/products/jsp/faq.html
>http://www.esperanto.org.nz/jsp/jspfaq.html
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
>______________________________________________
>FREE Personalized Email at Mail.com
>Sign up at http://www.mail.com/?sr=signup
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets