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.load 
(request.getSession().getServletContext().getResourceAsStream( "/[webapp 
rel path]/application.properties"));


I think No. 1 would be preferable as it doesn't require a request object 
and can exist anywhere in code.


-- David

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\\files\\"
   
  I doubt because of this line am i not able to run the appln. Pls let me know where should i place this application.properties file.
   
  Regards

  deepa
   
  Here is a code snnipet:

  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");
   
  Deepa
  
 }





-
 Jiyo cricket on Yahoo! India cricket
  




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



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\\files\\"
   
  I doubt because of this line am i not able to run the appln. Pls let me know where should i place this application.properties file.
   


I believe it should go in the WEB-INF/classes directory.  (not a 
subdirectory of that, I am unsure if that would also work.)


But I would comment out this portion of the code that opens and reads 
from the properties file and just hardcode the directory for now, while 
you are trying to get your servlet to activate.  (Better yet, even 
comment out the portion that uses this directory information, while you 
are trying to get the servlet to activate.  Best to proceed sequentially 
here rather than try to solve multiple problems at once.)


Glen

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



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 because of this line am i not able to run the appln. Pls let me know 
where should i place this application.properties file.
   
  Regards
  deepa
   
  Here is a code snnipet:
  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");
   
  Deepa
  
 }




-
 Jiyo cricket on Yahoo! India cricket

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/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]



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



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

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 configuration

On 1/31/06, vineesh kumar <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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]



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, 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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]



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 = "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 <[EMAIL PROTECTED]> 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

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
> 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:
> > (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\eclipse\workspace\com\deepa\servlet\DownloadFiles.java
> >
> > After a successful compile,
> > com\deepa\servlet\DownloadFiles.class
> > should be copied to the WEB-INF\classes directory of
> > your
> > web app.
> >
> > - Bob
> >
> > >   -Original Message-
> > >   From: DEEPA M N [mailto:[EMAIL PROTECTED]
> > >   Sent: Tue 1/31/2006 11:43 AM
> > >   To: Tomcat Users List
> > >   Cc:
> > >
> > 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)
> >
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

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



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:
> (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\eclipse\workspace\com\deepa\servlet\DownloadFiles.java
>
> After a successful compile,
> com\deepa\servlet\DownloadFiles.class
> should be copied to the WEB-INF\classes directory of
> your
> web app.
>
> - Bob
>
> >   -Original Message-
> >   From: DEEPA M N [mailto:[EMAIL PROTECTED]
> >   Sent: Tue 1/31/2006 11:43 AM
> >   To: Tomcat Users List
> >   Cc:
> >
> 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)
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



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\eclipse\workspace\com\deepa\servlet\DownloadFiles.java

After a successful compile,
com\deepa\servlet\DownloadFiles.class
should be copied to the WEB-INF\classes directory of
your
web app.

- Bob

>   -Original Message- 
>   From: DEEPA M N [mailto:[EMAIL PROTECTED] 
>   Sent: Tue 1/31/2006 11:43 AM 
>   To: Tomcat Users List 
>   Cc: 
>
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)


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: Download file Problem - 404 error

2006-01-30 Thread Avinash RS
Hi Deepa,
 
   I had the a similar problem and ONE of the reason to get a
NoCalssDefFoundError is that Tomcat is encountering more than one Servlet jar
in the classpath(which are different versions). I suggest you remove all the
entries for servlet jar from the classpth in environment variables 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 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.NoClassDefFoundError:
com/deepa/servlet/DownloadFiles (wrong name: DownloadFiles)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown
Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
  
  

D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes\com\d
eepa\servlet>java DownloadFiles
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown
Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
  
  Thank u


  Anto Paul <[EMAIL PROTECTED]> wrote:
  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.servlet.DownloadFiles.
Go to classes com/deepa/servlet and type java DownloadFiles.

It should give the same error since it is not in the right
package/directory structure.




   
-
 Jiyo cricket on Yahoo! India cricket 

-
Disclaimer
-

"This message(including attachment if any)is confidential and may be 
privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not 
be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If 
you have received this message by mistake please notify the sender by return  
e-mail and delete this message from your system. Any unauthorized use or 
dissemination of this message in whole or in part is strictly prohibited.  
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission."

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

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.please set the classpath as of to include the
serv;letapi.jar and this directory. and check whether this class is
public.
regards
vineesh



-
 Jiyo cricket on Yahoo! India cricket

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
>   vineesh
>
> 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/deepa/servlet/DownloadFiles (wrong name: DownloadFiles)
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClass(Unknown Source)
> > at java.security.SecureClassLoader.defineClass(Unknown Source)
> > at java.net.URLClassLoader.defineClass(Unknown Source)
> > at java.net.URLClassLoader.access$100(Unknown Source)
> > at java.net.URLClassLoader$1.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> >
> >
> >   
> > D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes\com\deepa\servlet>java
> >  DownloadFiles
> > Exception in thread "main" java.lang.NoClassDefFoundError: 
> > javax/servlet/http/HttpServlet
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClass(Unknown Source)
> > at java.security.SecureClassLoader.defineClass(Unknown Source)
> > at java.net.URLClassLoader.defineClass(Unknown Source)
> > at java.net.URLClassLoader.access$100(Unknown Source)
> > at java.net.URLClassLoader$1.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> >
> >   Thank u
> >
> >
> >   Anto Paul <[EMAIL PROTECTED]> wrote:
> >   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.servlet.DownloadFiles.
> > Go to classes com/deepa/servlet and type java DownloadFiles.
> >
> > It should give the same error since it is not in the right
> > package/directory structure.
> >
> >
> >
> >
> >
> > -
> >  Jiyo cricket on Yahoo! India cricket
> >
>

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



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 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)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>
>
>   
> D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes\com\deepa\servlet>java
>  DownloadFiles
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> javax/servlet/http/HttpServlet
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>
>   Thank u
>
>
>   Anto Paul <[EMAIL PROTECTED]> wrote:
>   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.servlet.DownloadFiles.
> Go to classes com/deepa/servlet and type java DownloadFiles.
>
> It should give the same error since it is not in the right
> package/directory structure.
>
>
>
>
>
> -
>  Jiyo cricket on Yahoo! India cricket
>

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



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/deepa/servlet/DownloadFiles (wrong name: DownloadFiles)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>


This means that the class is  not in the correct package. Put the
following line as the first line in the file DownloadFiles.java

package com.deepa.servlet;


>
>   
> D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes\com\deepa\servlet>java
>  DownloadFiles
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> javax/servlet/http/HttpServlet
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>
>   Thank u
>
>
>   Anto Paul <[EMAIL PROTECTED]> wrote:
>   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.servlet.DownloadFiles.
> Go to classes com/deepa/servlet and type java DownloadFiles.
>
> It should give the same error since it is not in the right
> package/directory structure.
>
>
>
>
>
> -
>  Jiyo cricket on Yahoo! India cricket
>


--
rgds
Anto Paul

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



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)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   
   
  
D:\Tomcat5.0\jakarta-tomcat-5.0.28\webapps\DownloadFile\WEB-INF\classes\com\deepa\servlet>java
 DownloadFiles
Exception in thread "main" java.lang.NoClassDefFoundError: 
javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   
  Thank u


  Anto Paul <[EMAIL PROTECTED]> wrote:
  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.servlet.DownloadFiles.
Go to classes com/deepa/servlet and type java DownloadFiles.

It should give the same error since it is not in the right
package/directory structure.





-
 Jiyo cricket on Yahoo! India cricket

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.servlet.DownloadFiles.
Go to classes com/deepa/servlet and type java DownloadFiles.

It should give the same error since it is not in the right
package/directory structure.



>
>   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(StandardWrapper.java:691)
>  at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  at 
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>  at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>  at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>  at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>  at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>  at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>  at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>  at java.lang.Thread.run(Thread.java:595)
> - Root Cause -
> java.lang.NoClassDefFoundError: com/deepa/servlet/DownloadFiles (wrong name: 
> DownloadFiles)
>  at java.lang.ClassLoader.defineClass1(Native Method)
>  at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>  at 
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
>  at 
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
>  at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
>  at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
>  at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:964)
>  at 
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
>  at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  at 
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>  at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>  at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>  at 
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>  at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.j

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(StandardWrapper.java:691)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 at java.lang.Thread.run(Thread.java:595)
- Root Cause -
java.lang.NoClassDefFoundError: com/deepa/servlet/DownloadFiles (wrong name: 
DownloadFiles)
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
 at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
 at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
 at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
 at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:964)
 at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 at java.lang.Thread.run(Thread.java:595)
   
  Thank u in advance
  Deepa
   


-
 Jiyo cri

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 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>   
>   Tomcat Documentation
>   
>  Tomcat Documentation.
>   
>
> 
> DownloadFiles
> com.deepa.servlet.DownloadFiles
> 
>
>  
> DownloadFiles
> /servlet/DownloadFiles
> 
> 
>
>   Now wen i run the appln, I get error 500. Pls let me know where i hav gone 
> wrong.


500 means internal server error. check the log files for the error and post it.


>   I believe there might be some silly mistake.
>   Always welcome ur help.
>   thank u
>   Regards
>   Deepa
>
>
> vineesh kumar <[EMAIL PROTECTED]> wrote:
>   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
>
>
>
> -
>  Jiyo cricket on Yahoo! India cricket
>


--
rgds
Anto Paul

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



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.
  
  

DownloadFiles
com.deepa.servlet.DownloadFiles

   
 
DownloadFiles
/servlet/DownloadFiles


   
  Now wen i run the appln, I get error 500. Pls let me know where i hav gone 
wrong.
  I believe there might be some silly mistake.
  Always welcome ur help.
  thank u
  Regards
  Deepa


vineesh kumar <[EMAIL PROTECTED]> wrote:
  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



-
 Jiyo cricket on Yahoo! India cricket

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 correct package directive, but the
.class file place is wrong.

The ClassLoader methods check, if the directory structure matches the
full class name (with the package).

Have a nice time

PETR


On 1/30/06, DEEPA M N <[EMAIL PROTECTED]> wrote:
>
>
> 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.ServletException: Error allocating a servlet instance
>  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>  org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>  
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>  org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>  
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>  java.lang.Thread.run(Thread.java:595)
>
> root cause
> java.lang.NoClassDefFoundError: com/deepa/servlet/DownloadFiles (wrong name: 
> DownloadFiles)   java.lang.ClassLoader.defineClass1(Native Method)   
> java.lang.ClassLoader.defineClass(ClassLoader.java:620)   
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)   
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
>
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) 
>   org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)   
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)   
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>  org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)   
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>java.lang.Thread.run(Thread.java:595)
>
> Pls let me know y i m getting like this.
>
> Thanks in advance
>
> Deepa
>
>
>
>
>
> -
>  Jiyo cricket on Yahoo! India cricket
>


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]> wrote:
> 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, but also i m getting some sort of error.
> >   Pls help me.
> >
> >   I greatly welcome ur help.
> >   Thank u
> >   Deepa
> >
> >
> > -
> >  Jiyo cricket on Yahoo! India cricket
> >
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [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 packages, but also i m getting some sort of error.
>   Pls help me.
>
>   I greatly welcome ur help.
>   Thank u
>   Deepa
>
>
> -
>  Jiyo cricket on Yahoo! India cricket
>

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



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 on Yahoo! India 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.ServletException: Error allocating a servlet instance
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
 org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 java.lang.Thread.run(Thread.java:595)
   
root cause 
java.lang.NoClassDefFoundError: com/deepa/servlet/DownloadFiles (wrong name: 
DownloadFiles)   java.lang.ClassLoader.defineClass1(Native Method)   
java.lang.ClassLoader.defineClass(ClassLoader.java:620)   
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)   
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
   
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
   
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
   
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
   
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)   
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)   
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)   
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
  
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)   
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
   java.lang.Thread.run(Thread.java:595)  

Pls let me know y i m getting like this.

Thanks in advance

Deepa





-
 Jiyo cricket on Yahoo! India cricket

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
> > 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:
> >
> >   
> >> PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> > Application 2.3//EN"
> > "http://java.sun.com/dtd/web-app_2_3.dtd";>
> >   
> >   Tomcat Documentation
> >   
> >  Tomcat Documentation.
> >   
> >
> > 
> > DownloadFiles
> > DownloadFiles
> > 
> >
> >  
> > DownloadFiles
> >
> > /servlet/DownloadFiles
> > 
> > 
> >
> >   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]



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 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:
>
>   
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>   
>   Tomcat Documentation
>   
>  Tomcat Documentation.
>   
>   
> 
> DownloadFiles
> DownloadFiles
> 
>   
>  
> DownloadFiles
>
> /servlet/DownloadFiles
> 
> 
>
>   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.

After placing DownloadFiles in a package:
(com.deepa.servlet)


  DownloadFiles
 
com.deepa.servlet.DownloadFiles


- Bob

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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