• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

Applet + Database workarounds.

Hi everyone,

I was reading about security restrictions of applets connecting to the database on different servers. One of the suggested way to sign the applet but since that involves $$$, someone suggested another way . The way is that you have a java application to connect to the database and then you have an applet to connect to the application.

Just wonderting if this gimmick is a common workaround for situations like this ?



0
zizi21
Asked:
zizi21
  • 3
  • 3
  • 3
  • +1
1 Solution
 
objectsCommented:
that would work if the java application was running on the server that applet was loaded from.
0
 
CEHJCommented:
>>but since that involves $$$,

It doesn't - you can create a self-signing certificate. See

http://mindprod.com/jgloss/signedapplets.html

(a site that uses a self-signed cert)
0
 
zizi21Author Commented:
thanks, i tried a bit of self signing last time and it was really cool especially when you could right your name,etc  but i guess, my boss is just being difficult...

objects,
when you say that "if the java application was running on the server that applet was loaded from.",
lets say the database and applets are on different servers. In order for this to work, the java application and applet needs to be on the same server ? However, the database could be on another server?

IS tht right ? Thanks
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
What Objects meant was to have server side components like servlet,  which connects to database and acts as a data provider for your applet.

Here server doesn't mean the physical servers instead they mean a Web Application server or a servlet engine which can host the server side components such as Tomcat.

Here is a great link which explains such a communication technique

http://www.j-nine.com/pubs/applet2servlet/Applet2Servlet.html



 
0
 
CEHJCommented:
If your applet is for limited use, say a few clients, then you may be able to get away with altering the security policy file on the client (see link above)
0
 
objectsCommented:
> my boss is just being difficult...

not really, noone's going to trust a self signed certificate. They are only for internal use.

> In order for this to work, the java application and applet needs to be on the same server ? However, the database could be on another server?

correct.
0
 
zizi21Author Commented:

This means, that the java application does not need to be servelet. It is just a simple java application that has a main method public static void main .

Is this right ? Thanks!
0
 
objectsCommented:
correct, it can be whatever you want. The applet just needs to be able to communicate with it.
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
>> It is just a simple java application that has a main method public static void main .

No its not. It has to be a server side component such as servlet or JSP.

0
 
zizi21Author Commented:
hi shivaspk,

why does it need to be in server side component ?

i thought, having the application in the run method would do..
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
Else you need to have some kind socket / http communication :)  
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now