On 1/30/06, Bob Hall <[EMAIL PROTECTED]> wrote:
> --- DEEPA M N <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to