my dog learned polymorphism
The moose likes JNLP and Web Start and the fly likes Applet -Servlet connection in JNLP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Applet -Servlet connection in JNLP" Watch "Applet -Servlet connection in JNLP" New topic

Applet -Servlet connection in JNLP

alex antony

Joined: Jan 26, 2011
Posts: 12
Hi all,

I am seeking your help in my assignment.

I am launching an applet through JNLP.

The directory Structure i am following is like this


The main code is here

This applet communicates with the servlet DaytimeServlet using the function httptext().The servlet connects to the database and returns back the values for filling the table.

When i am launching the applet via jnlp without the servlet it is launching fine.i.e i have hardcoded the values in the applet code only.But when i am trying to launch the applet with the servlet communication for getting the values from the database i am not able to launch it ..

i am not getting any errors ..i dont see anything

here is my jar file

here is my jnlp file

Anyone please suggest me where i am going wrong.Or please suggest me some atricles or link where i can get the communication going fine ..How to make this JNLP applet-Servlet Communication possible?
sourabh girdhar
Ranch Hand

Joined: Feb 10, 2010
Posts: 71

I haven't looked into your code deeply but I have one suggestion.

Why don't you use RMI for this kind of communication. I have used RMI for similar kind of functionality and believe me it is much faster and wasier as compared to http or webservices.

Letme know if you need any help about setting up RMI in web start application.

The significant problems we face cannot be solved by the same level of thinking that created them -- Albert Einstein

I agree. Here's the link:
subject: Applet -Servlet connection in JNLP
It's not a secret anymore!