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 propFile.loa

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 app.directory="D:\\temp\\file

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 b

Re: Download file Problem - 404 error

2006-01-31 Thread David Smith
Let's recap all the suggestions so far for this (assuming a package of com.deepa.servlet): 1) The class DownloadFiles.class must be located in WEB-INF/classes/com/deepa/servlet/. I won't mention jar files until this is working :-) 2) There can be only one of these class files in WEB-INF/clas

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 w

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 in

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 conf

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, u

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 = "d

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 i

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-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: D:\data\eclips

RE: Download file Problem - 404 error

2006-01-30 Thread Avinash RS
Problem - 404 error 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\classes>java com.deepa.servlet.DownloadFiles Exception in thread "main" java.lang.NoClass

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 correctly.p

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 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 w

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\classes>java > com.deepa.servlet.DownloadFiles > Exception in thread "main" java.lang.NoClassDefFoundError: > com/

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\classes>java 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, > > 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 com.deepa.s

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 org.apache.catalina.core.StandardWrapper.allocate

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. > > >PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application

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. http://java.sun.com/dtd/web-app_2_3.dtd";> Tomcat Documentation Tomcat Documentation. D

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 corre

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 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 pack

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 cricket

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 javax.servlet.Se

Re: Download file Problem - 404 error

2006-01-30 Thread Anto Paul
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 >

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 writt

Download file Problem - 404 error

2006-01-30 Thread DEEPA M N
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 a