• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rmi servlet on glassfish error

 
theer abcccc
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i'm so new in rmi and i need help
my rmi client work on application(not in web) but it has a problem when i change to servlet
i have an rmi error when i run servlet on glassfish

i guess it happen because policy file but i don't know how to create my own policy

here is my policy file
grant {
permission java.security.AllPermission;
};

here is error


here is my code



sorry about my pool engligh.

and thank in advance for your help
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

I don't know what that error message means, but I see some problems with this code:

For starters, Java code can't set its own security policy. You need to do that outside of the code when starting the JVM. Secondly, relative paths don't work in web apps (although this is moot once you address the first point). And lastly, printing out nothing when an exception occurs -basically ignoring it- is very unhelpful. At least print out the exception's message.

Also, handling GET and POST identically is a violation of the HTTP specification, even though the template code you're using does this. Remove the processRequest method, and decide whether to react to GET or POST.
 
theer abcccc
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much
i write new code Remove the processRequest method and write code into Get method
and not set paths policy which i put policy file to same directory
i will not printing out noting. (i try to print out exception but have noting)
but i have same problem if you have an idea please tell me thank you very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic