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/classes.
3) The source for DownloadFiles must declare it to be in package com.deepa.servlet (you've already done this in code below) 4) Restart your webapp after verifying all this to be sure tomcat has fresh information.

I'll add the next:
5) Don't mess with the classpath environment variable unless you are testing or compiling this class outside of tomcat. It is typically ignored. 6) You might want to restart tomcat itself just to be sure something funny hasn't crept in with all the work trying to fix this issue.

--David

DEEPA M N wrote:

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

On 1/31/06, vineesh kumar wrote:
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, ur code should work
but if still it's not working try to setup another tomcat that will be
time saving.as u are having the code files with u.u can easily
recreate another hierarchy of ur code on the newly setup tomcat.If u
are having much time u can try reconfiguring everything
regards
vineesh

On 1/31/06, DEEPA M N wrote:
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 = "dir";
private String separator;
private String root;
public DownloadFiles()
{
Properties propFile = null;
FileInputStream in = null;
String JAVA_HOME = "application.properties";
// Get a handle on the properties file
try{
in = new FileInputStream(JAVA_HOME);
propFile = new Properties();
propFile.load(in);
}
catch (IOException ignore){}
separator = "/";
// Get the directory from the application.properties file
// e.g. C:\\Temp\\Files\\
root = propFile.getProperty("app.directory");
}
Code continues.......
I m typing the url as
http://localhost:8080/Downloadfile/servlet/DownloadFiles

I m trying in all possible ways, but still i am getting the same error.
Pls help
Thanks in advance
Deepa
vineesh kumar wrote:
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 -



---------------------------------
Jiyo cricket on Yahoo! India cricket


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


                                
---------------------------------
Jiyo cricket on Yahoo! India cricket


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to