tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anto Paul <antop...@gmail.com>
Subject Re: Download file Problem - 404 error
Date Mon, 30 Jan 2006 09:32:23 GMT
On 1/30/06, Bob Hall <rfhall3@yahoo.com> wrote:
> --- DEEPA M N <deepu_1005@yahoo.co.in> wrote:
>
> >   Hi
> >   I m using Jdk1.5 and Tomcat 5.0.28 for my proj. I
> > have written a code which can download a file from
> > the server. The code is compiling properly. I pasted
> > the .class file in the
> > webapps/DownloadFile/WEB-INF/classes/
> >   Also i hav written web.xml in the WEB-INF folder.
> >   After running a appln, i get 404 Resource not
> > found error.
> >
> >   Before i hav worked on servlet and tomcat, i was
> > not getting such issues before. But now i m facing
> > such type of issues, i need to solve it as early as
> > possible. Here is a web.xml lines:
> >
> >   <?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/dtd/web-app_2_3.dtd">
> >   <web-app>
> >   <display-name>Tomcat Documentation</display-name>
> >   <description>
> >      Tomcat Documentation.
> >   </description>
> >
> >     <servlet>
> >         <servlet-name>DownloadFiles</servlet-name>
> >         <servlet-class>DownloadFiles</servlet-class>
> >     </servlet>
> >
> >  <servlet-mapping>
> >         <servlet-name>DownloadFiles</servlet-name>
> >
> > <url-pattern>/servlet/DownloadFiles</url-pattern>
> >     </servlet-mapping>
> > </web-app>
> >
> >   Pls do let me know how can i solve this prob.
> >   I always appreciate ur help.
> >   Thanks in advance.
> >
> >   Deepa
>
> Deepa,
>
> Your servlet must be in a package to work with Java
> 1.4
> and greater.
>

Hi Bob,

    I dont think the servlet need to be in a packge to call it from a
URL. It must be in a package if it is imported in another class.

Deepa
Everything seems to be fine with given web.xml. Did you extended the
HttpServlet class and implemented the service method() ?. Check error
log for any errors.

--
rgds
Anto Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message