This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes Issues regarding Applet-Servlet communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Issues regarding Applet-Servlet communication" Watch "Issues regarding Applet-Servlet communication" New topic

Issues regarding Applet-Servlet communication

hareesh Puthala

Joined: Jan 11, 2010
Posts: 21
can anyone helpme out please.................

Hi All................
I have few issues in our application development.
Can any one help me out if they are free.

problem is with the Applet Servlet communication.
In our application an applet is embeded in a jsp.
That applet when executed from a remote PC (client system) creates a text file(some bill will be generated eg:bill.txt) in the remote machine (eg. in the C: drive) and drives the local printer (default dot matrix printer) which is configured and connected to that remote macine and prints that text file.
Up to here it is working fine(creation of the file and printing the file using dot matrix printer).
After printing the file that applet needs to talk to servlet inorder to redirect the page to previous page.
Iam able to see(debug) the URL of the servlet within the java console and no exceptions are coming in the java console of the applet.
But the request is not reaching the servlet.
Servlet doesn't seem to get the object we are sending.
None of the debug messages in the Servlet appear on the server console.

Servlet code:

Thanks in Advance...

Plzzz help me out...

hareesh Puthala
hareesh Puthala

Joined: Jan 11, 2010
Posts: 21
Iam really very sorry..

Small correction
onSendData() and getConnection() methods arein the applet in my previous post..
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41129
Welcome to JavaRanch.

You can edit your post by using the button. When you do that, please also make sure that you UseCodeTags and that your code appears properly indented; it's unnecessarily hard to try and make sense of it otherwise.

Ping & DNS - my free Android networking tools app
hareesh Puthala

Joined: Jan 11, 2010
Posts: 21
Issue still pending with the Applet-Servlet communication.........
Any help would be appreciated..
Please ASAP
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41129
Does the code look more readable to you? Do you really not indent code?
hareesh Puthala

Joined: Jan 11, 2010
Posts: 21
Now that my Applet is able to talk to servlet.
I am able to see the System.out.println() 's with in my Servlet.
But with in my servlet,when i try to redirect it to some page it is not doing that.
Can youlook into this Ulf Dittmer
Can anyone help me out please...
sajjad ahmad
Ranch Hand

Joined: Jan 23, 2003
Posts: 75
I recently had some trouble in Applet servlet communication , in my case I found that Applet was not sending JSESSIONID back to servlet and because of that servlet was not able to get the appropriate session. I resolved the problem by making sure that JSESSIONID is always being passed from applet to servlet.
For more details you can view my blog.

I hope it works for you as well.

Sajjad Paracha
I agree. Here's the link:
subject: Issues regarding Applet-Servlet communication
Similar Threads
Applet servlet communication
HELP! Applet's trouble with Servlet's response
Swing - servlet communication
Applet notinitited, please need urgent help
Signed applet talking to server other than its own