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
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
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
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
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
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
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
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
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
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
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:
>
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
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
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
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
>
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
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/
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)
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
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
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
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
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
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]
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
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
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
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
>
--- 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
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
30 matches
Mail list logo