Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Security and JNLP

 
madhu mundhra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.. I am using one application as a jar file runnning with help of JNLP, as database credentials are stored in jar file itself.. its not as secure.. let me know the best solution for this problem..


1) Convert application Swing components into Web application
2) Run application using applet
3) use some servlet to connect to database

Or I have other options ..?
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets aren't any different from JNLP apps.

The usual solution would be to have the desktop app connect to a servlet via HTTP/HTTPS, and then the servlet would connect to the DB (and would return the results in the HTTP response).
 
Maneesh Godbole
Saloon Keeper
Posts: 11179
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

I would go with the application->servlet->DB route. Like Lester mentioned, there is no difference between JNLP apps and Applets, effectively its just a thick client.
However, if you use the servlet, you can store the DB credentials as a properties file under your WEB-INF on the server. In case you need to change the DB credentials or switch the DB, all you need to do is update the server side properties without having all the clients update their application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic