tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yilmaz" <>
Subject a simple ( irritating) classpath problem
Date Thu, 23 Aug 2001 04:22:11 GMT
hi all,
i have been using servlets and tomcat for a long time
but till now i couldn't figure out how to set the classpath exactly
Can some one please explain this briefly and clearly?
you might ask "how did you use tomcat without setting the classpath"
each time i used trial and error method, because the descriptions in docs
never seems to work correctly.
But at last i decided to solve this problem radically, becasue i am already
sick of classpath problems
first let me explain what my problem is:

I developed a message board using servlets
it works fine , but only with the default  charset.
namely, when users enters local charset (e.g: big5 chinese), my servlet
can't recognize these chars,
so only some question marks are stored into the database.
i tried to solve this problem with all kinds of methods available, but none
of them worked.
i tried servlet interest group, it didn't work either.
At last I used the ParameterParser class  of the oreilly package as
described in Jason's book(java servlet programming)
it worked, but i had a lot of trouble with the classpath settings
But still i don't know how to set it up,  beacause it started   not to work
Simply when i compile my servlet it doesn't recognize parameterparser class,
saying that it is not on classpath
because i put all the package (com.oreilly.servlet.*) in the same directory
with the servlet (under web-inf/classes/ com/servlet/  directory)
i tried putting the cos.jar file in the web-inf/lib directory, it didn't
in put these files directly under the web-inf/classes/   directory , it
didn't work either
according to docs, all the classes are in the classpath by default, so the
compiler supposed to find these classes, but it can't
then i added the full path <tomcat_home>/lib/cos.jar, to the classpath,
didn't work either.
well, i gave up, i just wanted to learn the LOGICAL way to set the classpath
PLEASE help me
by the i am using tomcat 4 ( already switched from tomcat 3.2.2), my OS is
win 2000, JDK is 1.3
i am sick of seraching the docs every time when i have the same problem
i am looking forward to your help as soon as possible

View raw message