This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet and Servlets: Redirecting to Servlet inside an Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet and Servlets: Redirecting to Servlet inside an Applet" Watch "Applet and Servlets: Redirecting to Servlet inside an Applet" New topic
Author

Applet and Servlets: Redirecting to Servlet inside an Applet

Krysty Sullivan
Ranch Hand

Joined: Jun 06, 2002
Posts: 48
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41042
    
  43
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.


Ping & DNS - my free Android networking tools app
Krysty Sullivan
Ranch Hand

Joined: Jun 06, 2002
Posts: 48
Thanks! Btw, how do I pass an array of obj or a hashmap from an applet to a servlet? via session? how?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41042
    
  43
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet and Servlets: Redirecting to Servlet inside an Applet
 
Similar Threads
AccessControlException Problem
Jsp
Can anyone help me with my JSP/servlet problem?
Applet to Servlet session problem
How to Send Session Object to Servlet through Applet