• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unwanted login dialog when running application from a JNLP.

 
Jeff Boulianne
Greenhorn
Posts: 2
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I'm building an application using the OpenCmis library to communicate with Cmis repositories. The librairy itself call REST services using the HttpUrlConnection object. So I don't have any access to the connection object. The authentication is made directly by the transport protocol: So the server returns a "http error 401 Unauthorize" when the provided credentials are wrong, the library catch the exception, raised a CmisSomethingException, the application manages it and everything works fine.

Everything works fine, until I tried to test the application outside my dev environment. The application is started from a JNLP and when I use it from there... some internal Java handling seems to outrun the library handling, catch the 401 error and pop a Java login dialog asking for credentials.

It works well if the user provides valid username and password. The login dialog is re-showned if the credentials are wrong. And finally, the 401 error is finally catched by the librairy (and passed to the application) if the login dialog is cancelled by the user.

The Look, the functionnalites and the feedback provided by this dialog to the user are not what we want.

Does anybody knows how to "bypass/get rid of" this dialog when using the app from Java web start???

Thanks

Jeff
 
Jeff Boulianne
Greenhorn
Posts: 2
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I add the following statement just before calling the librairy and the login dialog just disappear.

Authenticator.setDefault(new Authenticator());

Jeff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic