Re: a simple ( irritating) classpath problem

2001-08-24 Thread yap_noel


Just for the record, can you post what you did with ParameterParser (future
archive searchers will appreciate it)?

Thanks,
Noel

HI ALL,
first of all thanks for everybody for your help
those garbled chars you see on your email are chinese characters(big5)
but i already translated it for those  who may not be able to see
(understand)them
it says ParameterParser is not on the right classpath
Any way guys , finally after a lot of trial and error methods i managed to
make my
Tomcat to recognize ParameterParser
However, i am stil confused and didn't understand the logic behind the
classpath setting
because it seems to me that previously i had already done the same
settings,
but it ididn't work
now it works.
So i think the best idea is (as Craig  said)  One suggestion is to set up
your development environment to use Ant 1.3,
and let it take care of class path problems for you
i will try this method, otherwise handling classpath problems is really
wasting time
it takes longer time to set the classpath than developing the real
application
THANKS AGAIN TO EVRYBODY
CHEERS  =)



- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 24, 2001 8:16 AM
Subject: Re: a simple ( irritating) classpath problem


On Thu, 23 Aug 2001, yilmaz wrote:

 D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac
gs.java
 gs.java:37: 銝??ParameterParser
 ????辣嚗?\ParameterParser.class
 ??辣?急?嚗om.oreilly.servlet.ParameterParser
 ??餅??&靽∪冽迤蝖桃?classpath????銝?
  ParameterParser parser= new ParameterParser(req);
  ^
 1 ???

What are all those weird characters?  Not sure if they are doing anything
weird... other than that - I'm out of ideas

cheers
dim



áŠÇ(šk§‰Æ­Š‰â±ú+Šwè®f­Š‰Ú–›«¦‹²‰åȋb²z-Š{^×jƧ¡÷Þ®Šì¢XœŠÖ­Š‰ß¢»az›«r¬zŠìjW¨}©ò~)ڝȚ–)춻¦z{h­«ž‡ß‰Èš•Ê'~*æjبž‡ÚŸ+kj{rبœ
   
e™ªäzÚk‰Ç¬u«Zjwh¶«Šwè®f­Š‰Ú­éè·«­©íyÖ¬¶‡(š™^µéÞ²Ê+iÇ.­§2jwZ­ë.n7œ¶Ú…©à{­†‹­ž‹bqà'Éʙéí²Šìµ«^™éí²fz«z)Ý¢z-ç²Æ«Š\«yù^rÛa¢Ç¨|“Ì¢¸œ(Z±à¨ŠÛ,¹»v«‰ëÖŸ~)bj׬


Re: a simple ( irritating) classpath problem

2001-08-24 Thread yilmaz

Hi everyone,
i had two problems related with this thread
for the classpath problem the solution i found by chance :) is :
setting the environmental variables through the command window
as :
set
CLASSPATH=c:\jdk1.3;c:\jdk1.3\lib\tools.jar;d:\tomcat4\jakarta-tomcat-4.0-b7
\
mon\lib\servlet.jar;d:\tomcat4\jakarta-tomcat-4.0-b7\common\lib\cos.jar;
as you see  :) i removed all the unnecessary ones ,
servlet.jar is necessary for the tomcat itself
and cos.jar is for my utility classes such as PArametrParser ,
and these are enough.
by setting the env variables through the command window avoids the need for
logging out windows or restrating :)
i spent a lot of time , but i thing it worthed :)
my second problem was inserting chinese characters into the SQL server

if you have nothing to do with chinese chars you can simply ignore the rest
of this message.

after trying all possible methods to force my servlet to insert chinese
chars correctly,  and using trial and error method
Thanks God, at last i found the solution and my servlet works perfectly,
though it was not so easy

here i just wanted to share my experience so that the others may save time
and solve their problems.

the only solution  that worked for me  to insert chinese chars into a
database (at least SQL 2000 and MS Acces 2000 ) is using the ParameterParser
class which is bundled with oreilly package (and can be downloaded from
www.servlets.com) .

The following is the generally used method and is not working for
tomcat(3.2.2 - 4)   with big5 charset.

 String formVariable=req.getParameter(formVariable);
String myVariable=new String(formVariable.getBytes(iso-8859-1),big5);

the following method works  (from Jason's book):
ParameterParser parser=new ParameterParser (req);
parser.setCharacterEncoding(big5);
String myVariable=parser.getStringParameter(formVariable);

hope it helps for those who are having the similar problems
cheers :)


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 24, 2001 10:25 PM
Subject: Re: a simple ( irritating) classpath problem



 Just for the record, can you post what you did with ParameterParser
(future
 archive searchers will appreciate it)?

 Thanks,
 Noel

 HI ALL,
 first of all thanks for everybody for your help
 those garbled chars you see on your email are chinese characters(big5)
 but i already translated it for those  who may not be able to see
 (understand)them
 it says ParameterParser is not on the right classpath
 Any way guys , finally after a lot of trial and error methods i managed to
 make my
 Tomcat to recognize ParameterParser
 However, i am stil confused and didn't understand the logic behind the
 classpath setting
 because it seems to me that previously i had already done the same
 settings,
 but it ididn't work
 now it works.
 So i think the best idea is (as Craig  said)  One suggestion is to set up
 your development environment to use Ant 1.3,
 and let it take care of class path problems for you
 i will try this method, otherwise handling classpath problems is really
 wasting time
 it takes longer time to set the classpath than developing the real
 application
 THANKS AGAIN TO EVRYBODY
 CHEERS  =)



 - Original Message -
 From: Dmitri Colebatch [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 24, 2001 8:16 AM
 Subject: Re: a simple ( irritating) classpath problem


 On Thu, 23 Aug 2001, yilmaz wrote:
 
  D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac
 gs.java
  gs.java:37: 銝??ParameterParser
  ????辣嚗?\ParameterParser.class
  ??辣?急?嚗om.oreilly.servlet.ParameterParser
  ??餅??&靽∪冽迤蝖桃?classpath????銝?
   ParameterParser parser= new ParameterParser(req);
   ^
  1 ???

 What are all those weird characters?  Not sure if they are doing anything
 weird... other than that - I'm out of ideas

 cheers
 dim



 Nrj~jyj}jjz}}zvz~jjjrrsuyizqjʕz
 ji





Re: a simple ( irritating) classpath problem

2001-08-23 Thread yilmaz

here is the related part of my code:
import java.io.*;
import java.sql.*;
import java.text.DateFormat;
import java.util.*;
import java.lang.Math;
import javax.servlet.*;
import javax.servlet.http.*;
import com.oreilly.servlet.*;
public class gs extends HttpServlet {

.
 try {
 ParameterParser parser= new ParameterParser(req);
parser.setCharacterEncoding(big5);
 subject=parser.getStringParameter(subject);

..

and the compiler gives me the following error:

D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac gs.java
gs.java:37: 不能??ParameterParser
坏的?文件:.\ParameterParser.class
?文件含有??的?:com.oreilly.servlet.ParameterParser
?去掉或确信它出?在正确的classpath的子目?中.
 ParameterParser parser= new ParameterParser(req);
 ^
1 ???
simply it says that com.oreilly.servlet.ParameterParser is not on the
classpath
Strange,  ISN'T it?
cheers :)
- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 2:24 PM
Subject: Re: a simple ( irritating) classpath problem


 On Thu, 23 Aug 2001, yilmaz wrote:
  but all those efforts are in vain, i don't understand it.
  when i reference this ParameterParser file with fulll path it works
  like:
  com.oreilly.servlet.ParameterParser parser=new
  com.oreilly.servlet.ParameterParser ;
  this works,

 if that works then its not a classpath problem, but an import
 problem.  Are you sure you haven't got a simple typo or something?  post
 your code and we'll have a look (o:

 cheers
 dim








RE: a simple ( irritating) classpath problem

2001-08-23 Thread Scott Coleman

and what is your classpath set to ???


-Original Message-
From: yilmaz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 23, 2001 10:34 AM
To: [EMAIL PROTECTED]
Subject: Re: a simple ( irritating) classpath problem


here is the related part of my code:
import java.io.*;
import java.sql.*;
import java.text.DateFormat;
import java.util.*;
import java.lang.Math;
import javax.servlet.*;
import javax.servlet.http.*;
import com.oreilly.servlet.*;
public class gs extends HttpServlet {

.
 try {
 ParameterParser parser= new ParameterParser(req);
parser.setCharacterEncoding(big5);
 subject=parser.getStringParameter(subject);

..

and the compiler gives me the following error:

D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac gs.java
gs.java:37: 不能??ParameterParser
坏的?文件:.\ParameterParser.class
?文件含有??的?:com.oreilly.servlet.ParameterParser
?去掉或确信它出?在正确的classpath的子目?中.
 ParameterParser parser= new ParameterParser(req);
 ^
1 ???
simply it says that com.oreilly.servlet.ParameterParser is not on the
classpath
Strange,  ISN'T it?
cheers :)
- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 2:24 PM
Subject: Re: a simple ( irritating) classpath problem


 On Thu, 23 Aug 2001, yilmaz wrote:
  but all those efforts are in vain, i don't understand it.
  when i reference this ParameterParser file with fulll path it works
  like:
  com.oreilly.servlet.ParameterParser parser=new
  com.oreilly.servlet.ParameterParser ;
  this works,

 if that works then its not a classpath problem, but an import
 problem.  Are you sure you haven't got a simple typo or something?  post
 your code and we'll have a look (o:

 cheers
 dim







Re: a simple ( irritating) classpath problem

2001-08-23 Thread yilmaz

Scott Coleman wrote :
- Original Message -
From: Scott Coleman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 4:33 PM
Subject: RE: a simple ( irritating) classpath problem


and what is your classpath set to ???



CLASSPATH=.;C:\Aligo\M-1\jakarta-tomcat-3.2.2\lib\servlet.jar;C:\Aligo\M-1\j
akar
ta-tomcat-3.2.2\lib\cos.jar;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtim
e20;
c:\jdk1.3;c:\jdk1.3\lib\tools.jar;d:\tomcat4\jakarta-tomcat-4.0-b7\webapps\R
OOT\
WEB-INF\lib\cos.jar;

does the order make any difference ?






Re: a simple ( irritating) classpath problem

2001-08-23 Thread yilmaz

hi all,
i am sorry to bother you with my simple questions
please bear with me a few more seconds
the Problem is whenever i change the classpath or add something to it,
i have to log out windows 2000 to make those changes take effect
which is taking too much time and is irritating too.
Is there any simpler or faster way for that?
(restarting tomcat doesn't work)
thanks everybody :)
- Original Message -
From: yilmaz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 5:01 PM
Subject: Re: a simple ( irritating) classpath problem


 Scott Coleman wrote :
 - Original Message -
 From: Scott Coleman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 23, 2001 4:33 PM
 Subject: RE: a simple ( irritating) classpath problem


 and what is your classpath set to ???




CLASSPATH=.;C:\Aligo\M-1\jakarta-tomcat-3.2.2\lib\servlet.jar;C:\Aligo\M-1\j
 akar

ta-tomcat-3.2.2\lib\cos.jar;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtim
 e20;

c:\jdk1.3;c:\jdk1.3\lib\tools.jar;d:\tomcat4\jakarta-tomcat-4.0-b7\webapps\R
 OOT\
 WEB-INF\lib\cos.jar;

 does the order make any difference ?







RE: a simple ( irritating) classpath problem

2001-08-23 Thread Scott Coleman

Have a bat script that you run for the window you are in, to set the
environment and then run the class.
This will make your code a lot more portable.

Scott

-Original Message-
From: yilmaz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 23, 2001 11:09 AM
To: [EMAIL PROTECTED]
Subject: Re: a simple ( irritating) classpath problem


hi all,
i am sorry to bother you with my simple questions
please bear with me a few more seconds
the Problem is whenever i change the classpath or add something to it,
i have to log out windows 2000 to make those changes take effect
which is taking too much time and is irritating too.
Is there any simpler or faster way for that?
(restarting tomcat doesn't work)
thanks everybody :)
- Original Message -
From: yilmaz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 5:01 PM
Subject: Re: a simple ( irritating) classpath problem


 Scott Coleman wrote :
 - Original Message -
 From: Scott Coleman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 23, 2001 4:33 PM
 Subject: RE: a simple ( irritating) classpath problem


 and what is your classpath set to ???




CLASSPATH=.;C:\Aligo\M-1\jakarta-tomcat-3.2.2\lib\servlet.jar;C:\Aligo\M-1\j
 akar

ta-tomcat-3.2.2\lib\cos.jar;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtim
 e20;

c:\jdk1.3;c:\jdk1.3\lib\tools.jar;d:\tomcat4\jakarta-tomcat-4.0-b7\webapps\R
 OOT\
 WEB-INF\lib\cos.jar;

 does the order make any difference ?






Re: a simple ( irritating) classpath problem

2001-08-23 Thread Jonathan Eric Miller


- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 22, 2001 11:33 PM
Subject: Re: a simple ( irritating) classpath problem


 hi,

 There are three basic areas that classes can be put in tomcat:

 WEB-INF/classes
   - contains all the classes that form the web application
 WEB-INF/lib
   - contains jars that the web application uses
 TOMCAT_HOME/lib
   - contains jars that are available to _all_ applications using tomcat

There's one other one that I came across yesterday as well.

TOMCAT_HOME/server/lib

I think this is probably Tomcat 4 specific, not sure. I found that in order
to get JDBCRealm to work, I had to copy the .jar file for my JDBC driver to
this directory. Note, it didn't work when I first tried copying it to
TOMCAT_HOME/lib.

Jon





Re: a simple ( irritating) classpath problem

2001-08-23 Thread Noel L Yap

I'm also having problems with WEB-INF/lib.  At the time the JSP is compiled, it
seems that the Java compiler doesn't use WEB-INF/lib.  What can be done about
this?

Thanks,
Noel

hi,

There are three basic areas that classes can be put in tomcat:

WEB-INF/classes
  - contains all the classes that form the web application
WEB-INF/lib
  - contains jars that the web application uses
TOMCAT_HOME/lib
  - contains jars that are available to _all_ applications using tomcat

 because i put all the package (com.oreilly.servlet.*) in the same directory
 with the servlet (under web-inf/classes/ com/servlet/  directory)

if it is the package com.oreilly.servlet then it should go in
WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as
a jar, just put the jar in WEB-INF/lib .  If it is a zip, then rename it
to a jar.

 i tried putting the cos.jar file in the web-inf/lib directory, it didn't
 work

what do you mean it didn't work?  try jar -tf cos.jar to check that the
classes are in the jar.  I assume you are importing the required classes
and that they exist in the jar.

 in put these files directly under the web-inf/classes/   directory , it
 didn't work either

again, should be according to package

 then i added the full path tomcat_home/lib/cos.jar, to the classpath,
 didn't work either.

I'm not sure why that didn't work - although if you put cos.jar in the
classpath it _should_ be available to all web applications.

 well, i gave up, i just wanted to learn the LOGICAL way to set the classpath
 up.

you dont need to set the classpath yourself.  just put your jars in
WEB-INF/lib and your classes in WEB-INF/classes

hth, cheers
dim





This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase  Co., its
subsidiaries and affiliates.




Re: a simple ( irritating) classpath problem

2001-08-23 Thread Rob S.

Guys, not to be short-tempered here or anything, but open your eyes!

These class loading issues have been a hot topic on the list for the last week, while 
all of you are writing/reading your own messages.

1) Search or browse the list the archives.

2) See classloader.html that describes Catalina's class loading architecture.  You 
might have to browse the CVS repository... 
/jakarta-tomcat-4.0/catalina/docs/dev/classloader.html.

- r

On Thu, 23 Aug 2001 10:07:06 -0400 [EMAIL PROTECTED] wrote:
 I'm also having problems with WEB-INF/lib. At the time the JSP is compiled,
 it seems that the Java compiler doesn't use WEB-INF/lib. What can be done
 about this?
 
 Thanks,
 Noel
 
 hi,
 
 There are three basic areas that classes can be put in tomcat:
 
 WEB-INF/classes
   - contains all the classes that form the web application
 WEB-INF/lib
   - contains jars that the web application uses
 TOMCAT_HOME/lib
   - contains jars that are available to _all_ applications using tomcat
 
  because i put all the package (com.oreilly.servlet.*) in the same
 directory  with the servlet (under web-inf/classes/ com/servlet/
 directory)
 
 if it is the package com.oreilly.servlet then it should go in
 WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as
 a jar, just put the jar in WEB-INF/lib .  If it is a zip, then rename it
 to a jar.
 
  i tried putting the cos.jar file in the web-inf/lib directory, it didn't
  work
 
 what do you mean it didn't work?  try jar -tf cos.jar to check that the
 classes are in the jar.  I assume you are importing the required classes
 and that they exist in the jar.
 
  in put these files directly under the web-inf/classes/   directory , it
  didn't work either
 
 again, should be according to package
 
  then i added the full path tomcat_home/lib/cos.jar, to the classpath,
  didn't work either.
 
 I'm not sure why that didn't work - although if you put cos.jar in the
 classpath it _should_ be available to all web applications.
 
  well, i gave up, i just wanted to learn the LOGICAL way to set the
 classpath  up.
 
 you dont need to set the classpath yourself.  just put your jars in
 WEB-INF/lib and your classes in WEB-INF/classes
 
 hth, cheers
 dim
 
 
 
 
 
 This communication is for informational purposes only. It is not intended
 as an offer or solicitation for the purchase or sale of any financial
 instrument or as an official confirmation of any transaction. All market
 prices, data and other information are not warranted as to completeness or
 accuracy and are subject to change without notice. Any comments or
 statements made herein do not necessarily reflect those of J.P. Morgan
 Chase  Co., its subsidiaries and affiliates.






Re: a simple ( irritating) classpath problem

2001-08-23 Thread Craig R. McClanahan



On Thu, 23 Aug 2001, yilmaz wrote:

 Date: Thu, 23 Aug 2001 14:12:54 +0800
 From: yilmaz [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: a simple ( irritating) classpath problem

 thanks Dimitri
 but that is what i exactly did, and (of course) i imported oreily package
 at the beginning with ( import com.oreilly.servlet.*; )
 but all those efforts are in vain, i don't understand it.
 when i reference this ParameterParser file with fulll path it works
 like:
 com.oreilly.servlet.ParameterParser parser=new
 com.oreilly.servlet.ParameterParser ;
 this works,
 but why don't the others work.
 i put this packet under both tomcat_home/lib/cos.jar,
 tomcathomewebapps/root/web-inf/classes/com/oreilly/servlet/ and as well as
 tomcathomewebapps/root/web-inf/lib/ but still Doesn't work, simply i can't
 compile
 becasue it keeps telling me  ParameterParser is not on the classpath
 any ideas please ( i used tomcat 4 and tomcat 3.2.2 ) they both behave the
 same way
 thanks for your help

It sounds like part of your frustration is related to the fact that you
are using classpaths for two different things -- *compiling* your servlets
and *running* Tomcat.  They are two different needs, and often require two
different values.

One suggestion is to set up your development environment to use Ant 1.3,
and let it take care of class path problems for you.  Instructions on how
to do this are in the Tomcat 4 version of the Tomcat Application
Developer's Guide, which can be found online at:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc-exp/appdev/index.html

Nowdays, I routinely build and run webapps (and even Tomcat 4 itself) with
*nothing* in my CLASSPATH variable.  Whenever I need a classpath build, I
just tell Ant to do it for me.  Whenever I want a library JAR available in
Tomcat, I just drop it into the top-level lib directory.  Life is a lot
less frustrating if you let tools do some of the work for you.

Craig McClanahan




Re: a simple ( irritating) classpath problem

2001-08-23 Thread Craig R. McClanahan



On Thu, 23 Aug 2001, Jonathan Eric Miller wrote:

 Date: Thu, 23 Aug 2001 08:38:50 -0500
 From: Jonathan Eric Miller [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: a simple ( irritating) classpath problem


 - Original Message -
 From: Dmitri Colebatch [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 22, 2001 11:33 PM
 Subject: Re: a simple ( irritating) classpath problem


  hi,
 
  There are three basic areas that classes can be put in tomcat:
 
  WEB-INF/classes
- contains all the classes that form the web application
  WEB-INF/lib
- contains jars that the web application uses
  TOMCAT_HOME/lib
- contains jars that are available to _all_ applications using tomcat

 There's one other one that I came across yesterday as well.

 TOMCAT_HOME/server/lib

 I think this is probably Tomcat 4 specific,

Yes, it is.

 not sure. I found that in order
 to get JDBCRealm to work, I had to copy the .jar file for my JDBC driver to
 this directory. Note, it didn't work when I first tried copying it to
 TOMCAT_HOME/lib.


That's correct.  JAR files in this directory are made available to the
internal Tomcat classes -- and that's what JDBCRealm is, so it needs to
have access to the JDBC driver you want to use.

 Jon




Craig





Re: a simple ( irritating) classpath problem

2001-08-23 Thread Noel L Yap

What about tomcat-3.2.3?  I've been doing a lot of searching; all I've found
were trouble reports and no solutions.  Can you provide a  URL, please?

Thanks,
Noel

Guys, not to be short-tempered here or anything, but open your eyes!

These class loading issues have been a hot topic on the list for the last week,
while all of you are writing/reading your own messages.

1) Search or browse the list the archives.

2) See classloader.html that describes Catalina's class loading architecture.
You might have to browse the CVS repository...
/jakarta-tomcat-4.0/catalina/docs/dev/classloader.html.

- r

On Thu, 23 Aug 2001 10:07:06 -0400 [EMAIL PROTECTED] wrote:
 I'm also having problems with WEB-INF/lib. At the time the JSP is compiled,
 it seems that the Java compiler doesn't use WEB-INF/lib. What can be done
 about this?

 Thanks,
 Noel

 hi,

 There are three basic areas that classes can be put in tomcat:

 WEB-INF/classes
   - contains all the classes that form the web application
 WEB-INF/lib
   - contains jars that the web application uses
 TOMCAT_HOME/lib
   - contains jars that are available to _all_ applications using tomcat

  because i put all the package (com.oreilly.servlet.*) in the same
 directory  with the servlet (under web-inf/classes/ com/servlet/
 directory)

 if it is the package com.oreilly.servlet then it should go in
 WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as
 a jar, just put the jar in WEB-INF/lib .  If it is a zip, then rename it
 to a jar.

  i tried putting the cos.jar file in the web-inf/lib directory, it didn't
  work

 what do you mean it didn't work?  try jar -tf cos.jar to check that the
 classes are in the jar.  I assume you are importing the required classes
 and that they exist in the jar.

  in put these files directly under the web-inf/classes/   directory , it
  didn't work either

 again, should be according to package

  then i added the full path tomcat_home/lib/cos.jar, to the classpath,
  didn't work either.

 I'm not sure why that didn't work - although if you put cos.jar in the
 classpath it _should_ be available to all web applications.

  well, i gave up, i just wanted to learn the LOGICAL way to set the
 classpath  up.

 you dont need to set the classpath yourself.  just put your jars in
 WEB-INF/lib and your classes in WEB-INF/classes

 hth, cheers
 dim





 This communication is for informational purposes only. It is not intended
 as an offer or solicitation for the purchase or sale of any financial
 instrument or as an official confirmation of any transaction. All market
 prices, data and other information are not warranted as to completeness or
 accuracy and are subject to change without notice. Any comments or
 statements made herein do not necessarily reflect those of J.P. Morgan
 Chase  Co., its subsidiaries and affiliates.







This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase  Co., its
subsidiaries and affiliates.




Re: a simple ( irritating) classpath problem

2001-08-23 Thread Noel L Yap


These class loading issues have been a hot topic on the list for the last week,
while all of you are writing/reading your own messages.

The answers to these questions (or at least URLs to answers) need to be put into
the FAQ.

1) Search or browse the list the archives.

All I find are problem reports, not answers.

2) See classloader.html that describes Catalina's class loading architecture.
You might have to browse the CVS repository...
/jakarta-tomcat-4.0/catalina/docs/dev/classloader.html.

Where is classloader.html?  How can I get it?

Thanks,
Noel



This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase  Co., its
subsidiaries and affiliates.




Re: a simple ( irritating) classpath problem

2001-08-23 Thread Dmitri Colebatch

On Thu, 23 Aug 2001, yilmaz wrote:
 
 D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac gs.java
 gs.java:37: 不能??ParameterParser
 坏的?文件:.\ParameterParser.class
 ?文件含有??的?:com.oreilly.servlet.ParameterParser
 ?去掉或确信它出?在正确的classpath的子目?中.
  ParameterParser parser= new ParameterParser(req);
  ^
 1 ???

What are all those weird characters?  Not sure if they are doing anything
weird... other than that - I'm out of ideas

cheers
dim





Re: a simple ( irritating) classpath problem

2001-08-23 Thread yilmaz

HI ALL,
first of all thanks for everybody for your help
those garbled chars you see on your email are chinese characters(big5)
but i already translated it for those  who may not be able to see
(understand)them
it says ParameterParser is not on the right classpath
Any way guys , finally after a lot of trial and error methods i managed to
make my
Tomcat to recognize ParameterParser
However, i am stil confused and didn't understand the logic behind the
classpath setting
because it seems to me that previously i had already done the same settings,
but it ididn't work
now it works.
So i think the best idea is (as Craig  said)  One suggestion is to set up
your development environment to use Ant 1.3,
and let it take care of class path problems for you
i will try this method, otherwise handling classpath problems is really
wasting time
it takes longer time to set the classpath than developing the real
application
THANKS AGAIN TO EVRYBODY
CHEERS  =)



- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 24, 2001 8:16 AM
Subject: Re: a simple ( irritating) classpath problem


On Thu, 23 Aug 2001, yilmaz wrote:

 D:\tomcat4\jakarta-tomcat-4.0-b7\webapps\ROOT\WEB-INF\classesjavac
gs.java
 gs.java:37: 不能??ParameterParser
 ?ç???‡ä»¶ï¼?\ParameterParser.class
 ??‡ä»¶?«æ?:com.oreilly.servlet.ParameterParser
 ??»æ??–确信å¨æ­£ç¡®ç?classpath?„å???ä¸?
  ParameterParser parser= new ParameterParser(req);
  ^
 1 ???

What are all those weird characters?  Not sure if they are doing anything
weird... other than that - I'm out of ideas

cheers
dim





Re: a simple ( irritating) classpath problem

2001-08-22 Thread Dmitri Colebatch

hi,

There are three basic areas that classes can be put in tomcat:

WEB-INF/classes
  - contains all the classes that form the web application
WEB-INF/lib
  - contains jars that the web application uses
TOMCAT_HOME/lib
  - contains jars that are available to _all_ applications using tomcat

 because i put all the package (com.oreilly.servlet.*) in the same directory
 with the servlet (under web-inf/classes/ com/servlet/  directory)

if it is the package com.oreilly.servlet then it should go in
WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as
a jar, just put the jar in WEB-INF/lib .  If it is a zip, then rename it
to a jar.

 i tried putting the cos.jar file in the web-inf/lib directory, it didn't
 work

what do you mean it didn't work?  try jar -tf cos.jar to check that the
classes are in the jar.  I assume you are importing the required classes
and that they exist in the jar.

 in put these files directly under the web-inf/classes/   directory , it
 didn't work either

again, should be according to package

 then i added the full path tomcat_home/lib/cos.jar, to the classpath,
 didn't work either.

I'm not sure why that didn't work - although if you put cos.jar in the
classpath it _should_ be available to all web applications.

 well, i gave up, i just wanted to learn the LOGICAL way to set the classpath
 up.

you dont need to set the classpath yourself.  just put your jars in
WEB-INF/lib and your classes in WEB-INF/classes

hth, cheers
dim




Re: a simple ( irritating) classpath problem

2001-08-22 Thread yilmaz

thanks Dimitri
but that is what i exactly did, and (of course) i imported oreily package
at the beginning with ( import com.oreilly.servlet.*; )
but all those efforts are in vain, i don't understand it.
when i reference this ParameterParser file with fulll path it works
like:
com.oreilly.servlet.ParameterParser parser=new
com.oreilly.servlet.ParameterParser ;
this works,
but why don't the others work.
i put this packet under both tomcat_home/lib/cos.jar,
tomcathomewebapps/root/web-inf/classes/com/oreilly/servlet/ and as well as
tomcathomewebapps/root/web-inf/lib/ but still Doesn't work, simply i can't
compile
becasue it keeps telling me  ParameterParser is not on the classpath
any ideas please ( i used tomcat 4 and tomcat 3.2.2 ) they both behave the
same way
thanks for your help
- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 12:33 PM
Subject: Re: a simple ( irritating) classpath problem


 hi,

 There are three basic areas that classes can be put in tomcat:

 WEB-INF/classes
   - contains all the classes that form the web application
 WEB-INF/lib
   - contains jars that the web application uses
 TOMCAT_HOME/lib
   - contains jars that are available to _all_ applications using tomcat

  because i put all the package (com.oreilly.servlet.*) in the same
directory
  with the servlet (under web-inf/classes/ com/servlet/  directory)

 if it is the package com.oreilly.servlet then it should go in
 WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as
 a jar, just put the jar in WEB-INF/lib .  If it is a zip, then rename it
 to a jar.

  i tried putting the cos.jar file in the web-inf/lib directory, it didn't
  work

 what do you mean it didn't work?  try jar -tf cos.jar to check that the
 classes are in the jar.  I assume you are importing the required classes
 and that they exist in the jar.

  in put these files directly under the web-inf/classes/   directory , it
  didn't work either

 again, should be according to package

  then i added the full path tomcat_home/lib/cos.jar, to the classpath,
  didn't work either.

 I'm not sure why that didn't work - although if you put cos.jar in the
 classpath it _should_ be available to all web applications.

  well, i gave up, i just wanted to learn the LOGICAL way to set the
classpath
  up.

 you dont need to set the classpath yourself.  just put your jars in
 WEB-INF/lib and your classes in WEB-INF/classes

 hth, cheers
 dim







Re: a simple ( irritating) classpath problem

2001-08-22 Thread Dmitri Colebatch

On Thu, 23 Aug 2001, yilmaz wrote:
 but all those efforts are in vain, i don't understand it.
 when i reference this ParameterParser file with fulll path it works
 like:
 com.oreilly.servlet.ParameterParser parser=new
 com.oreilly.servlet.ParameterParser ;
 this works,

if that works then its not a classpath problem, but an import
problem.  Are you sure you haven't got a simple typo or something?  post
your code and we'll have a look (o:

cheers
dim


 but why don't the others work.
 i put this packet under both tomcat_home/lib/cos.jar,
 tomcathomewebapps/root/web-inf/classes/com/oreilly/servlet/ and as well as
 tomcathomewebapps/root/web-inf/lib/ but still Doesn't work, simply i can't
 compile
 becasue it keeps telling me  ParameterParser is not on the classpath
 any ideas please ( i used tomcat 4 and tomcat 3.2.2 ) they both behave the
 same way
 thanks for your help
 - Original Message -
 From: Dmitri Colebatch [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 23, 2001 12:33 PM
 Subject: Re: a simple ( irritating) classpath problem
 
 
  hi,
 
  There are three basic areas that classes can be put in tomcat:
 
  WEB-INF/classes
- contains all the classes that form the web application
  WEB-INF/lib
- contains jars that the web application uses
  TOMCAT_HOME/lib
- contains jars that are available to _all_ applications using tomcat
 
   because i put all the package (com.oreilly.servlet.*) in the same
 directory
   with the servlet (under web-inf/classes/ com/servlet/  directory)
 
  if it is the package com.oreilly.servlet then it should go in
  WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as
  a jar, just put the jar in WEB-INF/lib .  If it is a zip, then rename it
  to a jar.
 
   i tried putting the cos.jar file in the web-inf/lib directory, it didn't
   work
 
  what do you mean it didn't work?  try jar -tf cos.jar to check that the
  classes are in the jar.  I assume you are importing the required classes
  and that they exist in the jar.
 
   in put these files directly under the web-inf/classes/   directory , it
   didn't work either
 
  again, should be according to package
 
   then i added the full path tomcat_home/lib/cos.jar, to the classpath,
   didn't work either.
 
  I'm not sure why that didn't work - although if you put cos.jar in the
  classpath it _should_ be available to all web applications.
 
   well, i gave up, i just wanted to learn the LOGICAL way to set the
 classpath
   up.
 
  you dont need to set the classpath yourself.  just put your jars in
  WEB-INF/lib and your classes in WEB-INF/classes
 
  hth, cheers
  dim