|
 |
j2ee thread: RE: ProJavaServer -- J2EE: Need Callbacks Example Help
Message #1 by Chanoch Wiggers <ChanochW@w...> on Tue, 27 Feb 2001 12:34:17 -0000
|
|
there could be a few things going wrong here. I've posted an attempt at
helping people which I'll bcopy in again. Just a note, what is the
classfileserver you are using? does it serve html files and everything that
tomcat does too? how did you compile the applet and server class files? what
happens when you type that address into Navigator? (IE of any sort will not
work with this example, it doesnt support RMI - you would need to html
convert Applet.html to use the plugin from sun.)
the response I sent Manish is shown below
chanoch
Thankyou Manish for the html page you sent me, it's fine.
I couldnt reproduce the error that you have been getting but I have written
the list of things that you have to do to make this example work since they
are not included in the book per say. Here they are (I've written them so
that they might help other people besides youself in case they get stuck
too):
Supposing that you are using the code in the download I first added the
relevant context in my tomcat installation this meant adding the lines:
<Context path="/Callbacks"
docBase="c:/ProJavaServer/Chapter02/Callbacks">
</Context>
in the server.xml file for tomcat. That means that if I start tomcat and
type http://localhost:8080/Callbacks I get index.html loading. OK.
Now we must compile the code. First I compiled RegisterIt.java with the
line:
javac -classpath . RegisterIt.java
Now I use rmic to compile the applet and server
rmic -v1.2 CallbackApplet
rmic -v1.2 HelloServer
I opened a new window in the /Callbacks directory and started the rmi
registry:
rmiregistry -J-Djava.security.policy=Registerit.policy
I opened another new window in the /Callbacks directory and type the
following:
java RegisterIt
that should have everything under control. Its worth restarting tomcat now
if it is already running just to make sure. If its not, now is the time to
do so. The URL in the book should now come up and run the applet correctly.
Just to refresh your memory its
appletviewer -J-Djava.security.policy=registerit.policy
http://localhost:8080/Callbacks/Applet.html
try this out yourself, if it does not work then write back and we'll see
what happens. If you need to write back please include the list of files
that are in the callback directory please:
chanoch
|
|
 |