tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nancy Crisostomo Martinez" <>
Subject Applet-Servlet communication using Tomcat-Apache cooperation
Date Tue, 17 Jul 2001 00:03:35 GMT
Hi everybody!!

I'm new using Tomcat, instead I'm new developing web applications, so I
need help and patient...
I'm trying to make a applet-servlet communication thru Apache-Tomcat

Before I tried it with a Blazix web server, but it was just for tests,
because the web server was installed locally in a PC.. and it works
perfect and I got the Applet-Servlet communication.

Now, I'm trying to do the same with Apache-Tomcat installed in a Solaris
Server, and I had been trying that communication for days and I can't

I'm trying to make an application that can solve a educational
situation, like registration of subjects in my database (Oracle).
In this case the Applet only is used like an interface for the user. The
user can register a new subject thru the Applet, then the Applet send an
object to the Servlet thru a serializable class (Ubc.class) [all this
using ObjectInputStream and ObjectOutputStream classes]. The Servlet
recieve the Ubc object and interpret it from register all data like a
field in a table of the database.
Anyway, if the user only want to see all the list of subjects, the
Applet sends the url of the Servlet next to a parameter (UserOption =
"Display") and the servlet recieve the parameter and make a vector with
Ubc objects filling them with the database information and finally the
Servlet sends the vector with a writeObject method to the Applet, whose
displays the information in the screen. And that's all!!.

So, in Tomcat I create the next stucture:
---in classes directory store the servlet classes and the ubc.class

in Apache I did this:
---in proyectoprueba2 directory store the html file that invokes the
applet class, of course, I store the applet class, and the ubc.class.

Now I invoke the html file and it works very well, but when I tried to
register a subject invoking the servlet thru the applet, I only got an
       Error: 500
       Location: /proyectoprueba2/servlet/Servlet3
       Internal Servlet Error:

         at java.lang.ClassLoader.resolveClass0(Native Method)
         at java.lang.ClassLoader.resolveClass0(Compiled Code)
         at java.lang.ClassLoader.resolveClass(Compiled Code)
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(Compiled Code)

         at org.apache.tomcat.core.ServletWrapper.loadServlet(Compiled
         at org.apache.tomcat.core.ServletWrapper.init(Compiled Code)
         at org.apache.tomcat.core.Handler.service(


         at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
org.apache.tomcat.util.ThreadPool$ Code)
         at Code)

All the classes I did are part of a proyectoprueba2 package, so I had to
create the directory...
Where do I have put the Ubc class in Tomcat??
I'm working with Tomcat in a stand alone mode. Do I need to connect it
with Apache?? HOW???
I had been testing other servlets that are like "HelloWorld"... they
only print a text.. and they works perfect with Tomcat...

Can you help me???
I'll be waiting for your help....
Thank you advanced..


View raw message