*
The moose likes Other Application Frameworks and the fly likes How to send object from Applet to spring controller . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How to send object from Applet to spring controller ." Watch "How to send object from Applet to spring controller ." New topic
Author

How to send object from Applet to spring controller .

Kuladip Yadav
Ranch Hand

Joined: Jul 30, 2008
Posts: 162

Hi Ranchers ,

I want to send object from applet to spring servlet.
How should I can achieve this.
Any link appreciated .


Thank You

- Kuldeep Yadav
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Using a Spring controller here is no different than sending information from an applet to any server-side component. The thing to remember is that the applet is running in the user's browser, on a different machine from the server. You could use regular distributed programming approaches, like sockets/RMI/WebServices/etc. but since you explicitly want to talk to a servlet, a better approach may be to just have the applet do a URLConnection back to the server and send the object as text content to the servlet (if your object can be serialized as text).


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Kuladip Yadav
Ranch Hand

Joined: Jul 30, 2008
Posts: 162

Hi Nathan,

the applet do a URLConnection back to the server and send the object as text content to the servlet


But how can I implement that , any reference ?

Thanks
- Kuldeep
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Here's a message with some URLConnection code on the servlet-interest mail archive. I'd also suggest possibly using Apache Commons HttpClient to wrap the more basic URLConnection.
 
 
subject: How to send object from Applet to spring controller .