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