RE: Very basic problem

2002-01-02 Thread Edwards, Peter

Also, I think you are confusing CLASSPATH with PATH. 
  PATH is used by DOS to determine where the executables are e.g. java.exe
  CLASSPATH is used by Java to determine where class files (or jar files)
are

In your case the CLASSPATH should only contain the directory containing your
compiled class file. Do not confuse yourself by putting
d:\jdk1.3;d:\jdk1.3\bin; on your classpath.

Most people do not set the environment variable CLASSPATH at all since this
will be different for every application you write. I would set JAVA_HOME to
d:\jdk1.3 and then use the command line as follows (assuming you are in
the directory where your class file is):

%JAVA_HOME%\bin\java -cp . test

Note - -cp replaces -classpath in JDK1.3
 
Using JAVA_HOME like this allows you to save cmd/bat files that will work
even if you move to a new version of Java - just change JAVA_HOME.

Pete

-Original Message-
From: Jim Urban [mailto:[EMAIL PROTECTED]]
Sent: 02 January 2002 15:38
To: Tomcat Users List
Subject: RE: Very basic problem


This question should be asked on a Java forum, but here is your answer:
Add . to the beginning of your classpath:
CLASSPATH=.;d:\jdk1.3;d:\jdk1.3\bin;
This tells Java to look in the current directory for classes.
Jim

-Original Message-
From: Jack Li [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 9:26 AM
To: '[EMAIL PROTECTED]'
Subject: Very basic problem


Hello All,
I have a very basic problem. I try to an java application under DOS (Windows
operating system is windows 2000 server). I got error:

java.lang.NoClassDefFoundError: test.

The application is a sample from text book, very simple:

class test {
  public static void main(String args[]) {
System.out.println(Hello, World!);
  }

}

I run it by java test. I installed jdk1.3, and setup the CLASSPATH point
to d:\jdk1.3;d:\jdk1.3\bin;

what do I missed ?

Thanks,
Jack


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat4 installer problem

2001-10-01 Thread Edwards, Peter

I think there is a small problem with the windows installer failing to
re-install all the web applications.

After my initial installation I made a mistake and accidentally deleted the
webapps folder. (Stupid I know!) I then re-ran the installer and it offered
to update my current installation. This caused the webapps folder to be
re-created but only with the manager and ROOT applications - all the
examples are missing.

I thought someone might want to take a look at this at some point.
Ta!






RE: conflict between jaxp.jar, parser.jar (tomcat lib) and xalan.jar, xerces.jar?

2001-07-04 Thread Edwards, Peter



Markus

Are 
you suggesting that the jars are loaded in alphabetical order? I would have said 
you should either move parser.jar to the end of the class path or remove it 
entirely since xerces.jar contains the necessary jaxp interfaces. Tomcat 3.2 
does not access the parser directly but through jaxp so you can safely remove 
parser.jar and jaxp.jar and use only xerces.jar.

Pete

  -Original Message-From: Markus Strickler 
  [mailto:[EMAIL PROTECTED]]Sent: 04 July 2001 
  08:57To: [EMAIL PROTECTED]Subject: Re: 
  conflict between jaxp.jar, parser.jar (tomcat lib) and xalan.jar, 
  xerces.jar?
  Betty-
  
  The problem is with the order the jars are 
  loaded. There is a version confilict with some classes.
  A common workaround is to rename parser.jar 
  into zparser.jar, so it is loaded after xalan.jar and xerces.jar.
  
  This worked for me.
  
  -markus
  
- Original Message - 
From: 
Betty Chang 

To: [EMAIL PROTECTED] 

Sent: Wednesday, July 04, 2001 5:34 
AM
Subject: conflict between jaxp.jar, 
parser.jar (tomcat lib) and xalan.jar, xerces.jar?

Hi --

I'm running a servlet application that uses the 
apache-XML xalan.jar and xerces.jar files for handling XML/XSL 
stuff.

With tomcat 3.2.1, when I run my servlet, I 
get NoSuchMethodError on

 getNamespaceURI(), called 
by org.apache.xpath.DOM2Helper.getNamespaceOfNode().

I solved this problem by removing the jaxp.jar and 
parser.jar files that come with the tomcat installation and sit under 

the lib directory.

The servlet still runs without those jar files, so the 
xalan.jar and xerces.jar must do the trick.

Is there some kind of version conflict that causes the 
NoSuchMethodError?

Thanks

Betty



RE: conflict between jaxp.jar, parser.jar (tomcat lib) and xalan.jar, xerces.jar?

2001-07-04 Thread Edwards, Peter



Markus

You 
are right, I had forgotten that the scripts (even on NT) now create the class 
path dynamically. I was thinking of situations where I'm debugging in JBuilder 
and the classpath is static. I still suggest that it's as easy to make Tomcat 
use xerces instead of jaxp and parser - are you aware of any issues with 
this?

Pete

  -Original Message-From: Markus Strickler 
  [mailto:[EMAIL PROTECTED]]Sent: 04 July 2001 
  09:43To: [EMAIL PROTECTED]Subject: Re: 
  conflict between jaxp.jar, parser.jar (tomcat lib) and xalan.jar, 
  xerces.jar?
  Pete-
  AFAK the Startscripts for tomcat construct 
  their own classpath from the lib directory during startup. This is done in 
  alphabetical order, on most platforms. So renaming parser.jar is a quick and 
  dirty way to move it to the end of the Tomcat classpath.
  See http://xml.apache.org/cocoon/install.html#tomcatfor 
  details.
  
  -markus
  
- Original Message - 
From: 
Edwards, Peter 
To: '[EMAIL PROTECTED]' 

Sent: Wednesday, July 04, 2001 10:14 
AM
Subject: RE: conflict between jaxp.jar, 
parser.jar (tomcat lib) and xalan.jar, xerces.jar?

Markus

Are you suggesting that the jars are loaded in 
alphabetical order? I would have said you should either move parser.jar to 
the end of the class path or remove it entirely since xerces.jar contains 
the necessary jaxp interfaces. Tomcat 3.2 does not access the parser 
directly but through jaxp so you can safely remove parser.jar and jaxp.jar 
and use only xerces.jar.

Pete

  -Original Message-From: Markus Strickler 
  [mailto:[EMAIL PROTECTED]]Sent: 04 July 2001 
  08:57To: [EMAIL PROTECTED]Subject: Re: 
  conflict between jaxp.jar, parser.jar (tomcat lib) and xalan.jar, 
  xerces.jar?
  Betty-
  
  The problem is with the order the jars are 
  loaded. There is a version confilict with some classes.
  A common workaround is to rename parser.jar 
  into zparser.jar, so it is loaded after xalan.jar and 
  xerces.jar.
  
  This worked for me.
  
  -markus
  
- Original Message - 
From: 
Betty 
Chang 
To: [EMAIL PROTECTED] 

Sent: Wednesday, July 04, 2001 5:34 
AM
Subject: conflict between jaxp.jar, 
parser.jar (tomcat lib) and xalan.jar, xerces.jar?

Hi --

I'm running a servlet application that uses the 
apache-XML xalan.jar and xerces.jar files for handling 
XML/XSL stuff.

With tomcat 3.2.1, when I run my servlet, 
I get NoSuchMethodError on

 getNamespaceURI(), 
called by org.apache.xpath.DOM2Helper.getNamespaceOfNode().

I solved this problem by removing the jaxp.jar and 
parser.jar files that come with the tomcat installation and sit under 

the lib directory.

The servlet still runs without those jar files, so the 
xalan.jar and xerces.jar must do the trick.

Is there some kind of version conflict that causes the 
NoSuchMethodError?

Thanks

Betty



Authentication problem with servlets opening connection to other servlets

2001-04-23 Thread Edwards, Peter

I am using the MemoryRealm to protect my web application. I have a servlet
that constructs a URL for another servlet in the same web application but I
find that when it opens a connection to the other servlet, the
authentication is not passed on and so it fails to open the stream. The only
error I get back is FileNotFoundException but if I turn off authentication
everything works.

Can anyone please guide me as to how to set this up correctly?

Should the error have been reported more helpfully?

Any help would be deeply appreciated.

Pete



RE: How to use SVG-Files?

2001-04-05 Thread Edwards, Peter

Add the following to your web.xml file:

!-- Add SVG as a mime type so that browsers can use the correct plug-in
--
mime-mapping
extension
svg
/extension
mime-type
image/svg-xml
/mime-type
/mime-mapping
mime-mapping
extension
svgz
/extension
mime-type
image/svg-xml
/mime-type
/mime-mapping

Pete

-Original Message-
From: Matthias Zumstein [mailto:[EMAIL PROTECTED]]
Sent: 04 April 2001 14:58
To: [EMAIL PROTECTED]
Subject: How to use SVG-Files?


Hello,

I want to display SVG-Files but I only get the CDATA from the SVG-File. I
think I have to set up the web.xml but I don't know if I only have to change
this file or if I need another change?

Thank you

Matthias Zumstein

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net



RE: Multiple files upload

2001-03-29 Thread Edwards, Peter

Lakshmi

If you are using an HTML form to upload the file then you have some
restrictions. The file input element lets you upload one file only and you
cannot script this element (i.e. you cannot dynamically set the value of the
field for security reasons.)

This led us to writing an applet but we couldn't find any easy way of
building a multipart message using the standard java.net package. In the end
we use the java zip capabilities to zip all the required files into a single
file and then sent it using the HTTPClient available at
http://www.innovation.ch/java/HTTPClient/. We could have uploaded the file
to a servlet using the HTTP PUT method but we were sending to a CGI script
that only supported POST and GET so we had to use the multipart message. In
you case a combination of zip and PUT might work.

Pete

-Original Message-
From: Adilakshmi Lingam [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2001 21:39
To: Tomcat-User@Jakarta. Apache. Org
Subject: Multiple files upload


Hi,

We need to upload all the files in a directory from the clients machine to
the server.
I've been reading that we could achieve that using the Oreilly's
MultipartRequest object. But I understood that you can do that file by file
only but not all the files if the client selects a directory.

If anyone has experience in uploading multiple files through a servlet, I
would appreciate if you could guide me in the right direction.

I was also considering using FTPClient class in sun.net package. But
couldn't find any documentation for that. Is it advisable to use that? any
thoughts on FTP from a servlet??

Thanks for your help,
Lakshmi



Authentication of passwords

2001-03-26 Thread Edwards, Peter

I have set up a JDBCRealm in Tomcat 4 (on Win2000 using remote Oracle 8i
database). Initially I had the known problem of "Realm already started" but
when I came in this morning the problem had gone away.

Can anyone tell me what the options are for the Digest element in
server.xml? I'm new to security so I'm trying to understand which
encryptions are supported out of the box.

I'm trying to connect into an existing authentication system that uses DES
encryption on Unix - has anyone got any advice on how I can set up tomcat to
use this digest type?

Thanks
Pete




Xalan and Tomcat - installation and performance issues

2001-02-16 Thread Edwards, Peter

I hope no-one minds me cross-posting this but it covers all areas.

I have had success using Xalan2 in a servlet on Tomcat3.2 and also found
some major performance problems. I thought it would be useful for people to
be aware of these problems and I would value any comments/suggestions.

First, I hit the well-known problem of clashing XML parsers. I solved this
by removing jaxp.jar and parser.jar from the tomcat\lib directory and
inserted xerces,jar in their place. This does not work on Tomcat3.1 since it
directly uses xml.jar - you have to add xerces to the classpath of the
server startup before the other jars.

I was then able to create a simple servlet using Xalan2 to perform a
transformation (using Transformer). I'm using JDK1.3, NT4 running on 600MHz
P3 with 256Mb RAM. The performance was appalling so I did a number of tests
with the following code:

TransformerFactory tFactory = TransformerFactory.newInstance(); //
step1

StreamSource style = new StreamSource(xsl); //
step2
StreamSource source = new StreamSource(xml);
StreamResult res = new StreamResult(out);

Transformer transformer = tFactory.newTransformer(style);   //
step3

transformer.transform(source, res); //
step4

Command line usage:
Step1 - 280ms
Step2 - 20ms
Step3 - 3946ms
Step4 - 531ms

Servlet in Tomcat 3.2.1
Step1 - 2954ms
Step2 - 421ms
Step3 - 46266ms
Step4 - 8442ms

As you can see, the performance degraded by about 10 times. I got around
this by going against everything I believed about  where to place libs in
tomcat and loaded all jars in the server startup script. The problem goes
away.

I believe this is a problem with class loading on Tomcat.

Pete Edwards

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