• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Applet and Servlets: Redirecting to Servlet inside an Applet

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I pass an array of objects to a jsp page or servlet from an applet?
How do I redirect to a jsp page from an applet, hence replacing the applet.
Thanks in advance.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the applet.getAppletContext().showDocument method to replace the current page with another one.

Some hints on how to access servlets/JSPs can be found on this wiki page.
 
Krysty Sullivan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks! Btw, how do I pass an array of obj or a hashmap from an applet to a servlet? via session? how?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Through serialization, as outlined in the example linked from that page. Or are you talking about passing it along as part of the servlet call that will replace the applet? Then you'd have to add it as an URL parameter. That might involve the java.bean.XMLEncoder class and some base64-encoding of the result.
 
reply
    Bookmark Topic Watch Topic
  • New Topic