• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to send object from Applet to spring controller .

 
Ranch Hand
Posts: 162
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Kuladip Yadav
Ranch Hand
Posts: 162
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic