Re: Download file Problem - 404 error

2006-02-01 Thread David Smith
I've done code similar to this. Yore can go one of two ways: 1) Store your properties file in WEB- INF/classes and then call propFile.load(this.getClass().getClassLoader().getResourceAsStream(application.properties'')); 2) Store the properties file anywhere in the webapp and call

Re: Download file Problem - 404 error

2006-01-31 Thread vineesh kumar
that may be the correct path also check that package com.deepa.servlet; at the first line itself is declared in ur java file On 1/31/06, Bob Hall [EMAIL PROTECTED] wrote: Deepa, As someone pointed out in an earlier post you need to include the following in your DownloadFile.java file:

Re: Download file Problem - 404 error

2006-01-31 Thread vineesh kumar
that may be the correct path also check that package com.deepa.servlet; at the first line itself is declared in ur java file - Show quoted text - On 1/31/06, vineesh kumar [EMAIL PROTECTED] wrote: that may be the correct path also check that package com.deepa.servlet; at the first line itself

Re: Download file Problem - 404 error

2006-01-31 Thread DEEPA M N
Here r few lines of codes; package com.deepa.servlet; import java.io.*; import java.util.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.zip.GZIPOutputStream; public class DownloadFiles extends HttpServlet { private static final String DIR =

Re: Download file Problem - 404 error

2006-01-31 Thread vineesh kumar
do u changed ur web.xml also the code is ok it should work.but u hav to check all the other files also like web.xml from the older web.xml file it was written that the servlet class is Downloadfiles but u hav to change it to com.deepa.servlet.Downloadfiles if all these things are working,

Re: Download file Problem - 404 error

2006-01-31 Thread vineesh kumar
one more thing u can do is put an index.html on ur Downloadfile directory(ie the root folder of ur app).and try typing http://localhost:8080/Downloadfile/ then the tomcat should show the html file if that too is not happening, the problem may be with ur server.xml or even worse on ur catalina

Re: Download file Problem - 404 error

2006-01-31 Thread DEEPA M N
I hav changed web.xml after including package. In this code i m not accessing the servlet thr' html rather i m using the url in the browser window. http://localhost:8080/DownloadFile/servlet/DownloadFiles vineesh kumar [EMAIL PROTECTED] wrote: one more thing u can do is put an

Re: Download file Problem - 404 error

2006-01-31 Thread vineesh kumar
that's ok. the test is for checking the path is recognised by tomcat or not.if tomcat is not showing the index.html, then the problem is in ur servel.xml ot context,xml. for making sure what's the problem only i suggesterd the test On 1/31/06, DEEPA M N [EMAIL PROTECTED] wrote: I hav changed

Re: Download file Problem - 404 error

2006-01-31 Thread DEEPA M N
Hi, wen i checked the log file, i think the error might be in the line of the code. root = propFile.getProperty(app.directory); This code should be able to download the files from the server. so i m using application.properties where app.directory=D:\\temp\\files\\ I doubt

Re: Download file Problem - 404 error

2006-01-31 Thread Glen Mazza
DEEPA M N wrote: Hi, wen i checked the log file, i think the error might be in the line of the code. root = propFile.getProperty(app.directory); This code should be able to download the files from the server. so i m using application.properties where

Re: Download file Problem - 404 error

2006-01-30 Thread Bob Hall
--- 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

Re: Download file Problem - 404 error

2006-01-30 Thread DEEPA M N
Hi Thank u, I did as u mentioned. But wen i run the appln now, i m getting this error. Http status 500: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception

Re: Download file Problem - 404 error

2006-01-30 Thread DEEPA M N
Hi Anto Paul, Ya I extended HttpServlet method and also service() method. I also tried wit packages, but also i m getting some sort of error. Pls help me. I greatly welcome ur help. Thank u Deepa - Jiyo

Re: Download file Problem - 404 error

2006-01-30 Thread vineesh kumar
deepa, plz send ur web.xml and server.xml on each change.so that we can hav a look on that and understand the problem regards vineesh On 1/30/06, DEEPA M N [EMAIL PROTECTED] wrote: Hi Anto Paul, Ya I extended HttpServlet method and also service() method. I also tried wit packages,

Re: Download file Problem - 404 error

2006-01-30 Thread vineesh kumar
Deepa, plz check the following things is ur class is public? whether the class name is DownloadFiles.class itself? also check the access permissions of the class and tomcat directory if ur on a X'nix machine On 1/30/06, vineesh kumar [EMAIL PROTECTED]

Re: Download file Problem - 404 error

2006-01-30 Thread Petr Hadraba
Deepa, The java.lang.NoClassDefFoundError: com/deepa/servlet/DownloadFiles (wrong name: DownloadFiles) error message means that you have class DownloadFiles in the package directory structure com.deepa.servlet.DownloadFiles, but you ommit the package directive in the source code, OR you have

Re: Download file Problem - 404 error

2006-01-30 Thread DEEPA M N
Hi Vineesh, The class name is DownloadFiles.class Pls let me know wat is access permissions of the class and tomcat. I m posting my web.xml after including package. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application

Re: Download file Problem - 404 error

2006-01-30 Thread Anto Paul
On 1/31/06, DEEPA M N [EMAIL PROTECTED] wrote: Hi Vineesh, The class name is DownloadFiles.class Pls let me know wat is access permissions of the class and tomcat. I m posting my web.xml after including package. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC

Re: Download file Problem - 404 error

2006-01-30 Thread DEEPA M N
Hi, Here is a log file. Pls let me know how can i correct it. 2006-01-31 10:30:54 StandardWrapperValve[DownloadFiles]: Allocate exception for servlet DownloadFiles javax.servlet.ServletException: Error allocating a servlet instance at

Re: Download file Problem - 404 error

2006-01-30 Thread Anto Paul
On 1/31/06, DEEPA M N [EMAIL PROTECTED] wrote: Hi, Here is a log file. Pls let me know how can i correct it. In what package it is defined ?. Are you sure you deleted the old classfiles and compiled the classfiles to the right folder ? Go to WEB-INF\classes and type java

Re: Download file Problem - 404 error

2006-01-30 Thread DEEPA M N
Hi I did as u said. This is wat the error i m getting. D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classesjava com.deepa.servlet.DownloadFiles Exception in thread main java.lang.NoClassDefFoundError: com/deepa/servlet/DownloadFiles (wrong name: DownloadFiles)

Re: Download file Problem - 404 error

2006-01-30 Thread Anto Paul
On 1/31/06, DEEPA M N [EMAIL PROTECTED] wrote: Hi I did as u said. This is wat the error i m getting. D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classesjava com.deepa.servlet.DownloadFiles Exception in thread main java.lang.NoClassDefFoundError:

Re: Download file Problem - 404 error

2006-01-30 Thread vineesh kumar
Deepa this error comes bcos the classpath of urs is not set correctly.please set the classpath as of to include the serv;letapi.jar and this directory. and check whether this class is public. regards vineesh On 1/31/06, DEEPA M N [EMAIL PROTECTED] wrote: Hi I did as u said. This is wat

Re: Download file Problem - 404 error

2006-01-30 Thread vineesh kumar
Also check the package name On 1/31/06, vineesh kumar [EMAIL PROTECTED] wrote: Deepa this error comes bcos the classpath of urs is not set correctly.please set the classpath as of to include the serv;letapi.jar and this directory. and check whether this class is public. regards

Re: Download file Problem - 404 error

2006-01-30 Thread DEEPA M N
Hi, I hav set the classpath in the environment variables as below D:\Tomcat5.0\jakarta-tomcat-5.0.28\common\lib\servlet-api.jar Let me know is this correct? regards Deepa vineesh kumar [EMAIL PROTECTED] wrote: Deepa this error comes bcos the classpath of urs is not set

RE: Download file Problem - 404 error

2006-01-30 Thread Avinash RS
and try accessing your application. ping me if you require more info. Regards, Avinash -Original Message- From: DEEPA M N [mailto:[EMAIL PROTECTED] Sent: Tue 1/31/2006 11:43 AM To: Tomcat Users List Cc: Subject: Re: Download file

RE: Download file Problem - 404 error

2006-01-30 Thread Bob Hall
Deepa, As someone pointed out in an earlier post you need to include the following in your DownloadFile.java file: (usually, as the first line) package com.deepa.servlet; You would also normally place DownloadFiles.java in a directory that ended in com/deepa/servlet. In WinSpeak: