aspose file tools*
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 JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Issues regarding Applet-Servlet communication" Watch "Issues regarding Applet-Servlet communication" New topic
Author

Issues regarding Applet-Servlet communication

hareesh Puthala
Greenhorn

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
Greenhorn

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
Marshal

Joined: Mar 22, 2005
Posts: 42592
    
  65
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
Greenhorn

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

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

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
or
Can anyone help me out please...
sajjad ahmad
Ranch Hand

Joined: Jan 23, 2003
Posts: 78
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.

http://javaiscoool.blogspot.com/2011/05/appletswingflexj2me-to-servlet.html

I hope it works for you as well.

Thanks.
Sajjad Paracha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issues regarding Applet-Servlet communication