servlet problem

I am writing a servlet that uses a package to convert text to pdf. This package uses java.util.Arraylist. When i compile the servlet with the command line everything works fine; when i publish it; i always get a classnotfoundexception : arraylist.
Now in order to find a solution, i wrote it in an application, and compiled it with the command line jdk 1.2.2 on the server and run the application. Everything worked fine then, the result was perfect. Now it did not give an arraylist error.
How can i do this in a servlet; considering everything works fine in an application, why doesn't it work in a servlet ??? The classpath must be correct because i can run the application .. or not ? Eventually they both use the same package; could it be that the classpath in the environment for doesn't work for a servlet ?
I am using Java Webserver 2.0 and JDK 1.2.2; i am using the classes found at : http://allserv.rug.ac.be/~blowagie/java-pdf/; this is my classpath : C:\servlet.jar;.;c:\Software\java\collections.jar;c:\InetPub\wwwroot\lib\rugPdf020.jar;
When I add an extra jar file containing the java.util.arraylist in the classpath; i get some other strange errors (like java.lang.NoClassDefFoundError: be/ac/rug/text/pdf/PdfMediaBox at com.sun.server.security.ServletSecurity11x.inServlet(Compiled Code)); ... plz help me
tappelmaAsked:
Who is Participating?
 
vladi21Connect With a Mentor Commented:
I think
ur servlet engine not 1.2 compatible

maybe better use JGL?
0
 
Ravindra76Commented:
Hi tappelma,

 It was the classpath problem.

 add the path of your ibm package in the sebsrver's path.

Best of luck.

PS:Mention environment webserver,jdb etc.
0
 
heyhey_Commented:
or you can download Collections package for 1.1 from www.javasoft.com
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
tappelmaAuthor Commented:
Edited text of question.
0
 
tappelmaAuthor Commented:
Adjusted points to 200
0
 
tappelmaAuthor Commented:
downloading collections and adapting class_path does not work.
0
 
heyhey_Commented:
so what's the problem.
give us more information.

I suppose that JWS uses 1.1 JavaVM, you just have to add the collection classes to its classpath - or don't use them at all.
0
 
tappelmaAuthor Commented:
Edited text of question.
0
 
tappelmaAuthor Commented:
Thx a lot dude; i installed JRun and everything works fine nog; so i guess java web server is not jdk 1.2.2 compliant.
0
All Courses

From novice to tech pro — start learning today.