unable to implement HTTP Tunneling correctly in order to enable Java rmi calls over internet(and und
- by Lokesh Kumar
in my previous question :-How to Setup RMI Server under(NAT/ISP)
Now,i m able to start my RMI server by Installing apache Tomcat 6.0 server.
i have also installed servlet programs into apache Tomcat server in order to enable HTTP tunneling.
my servlet codes:-
(1) [SimplifiedServletHandler.java][2]
(2) [ServletForwardCommand.java][3]
these servlets resides inside :-
C:\Program Files\Apache Software
Foundation\Tomcat
6.0\webapps\examples\WEB-INF\classes\
one more thing that i hv added to my CalcultorClient.java program:-
try {
RMISocketFactory. setSocketFactory(new sun.rmi.transport.proxy
.RMIHttpToCGISocketFactory( ));
}catch (IOException ignored)
{
System.out.println("Error :- ignored.getMessage()");
}
But,when i try to make client connect with server(under ISP/NAT) i get the following Exception :-
RemoteException
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception
is:
java.io.IOException: HTTP request failed
i don't know the correct reason behind this Exception..
but,i think that i haven't installed or invoke my servlet programs properly on server side.
so,can anybody tell me the correct reason behind this error/Exception?????
and if u think that it is servlet problem then tell me the correct procedure to run my serlvet program inside tomcat server.