• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening New Browser from an Applet with sending an array

 
Muhammed Aamir
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody tell me how to send an array to an HTML from an applet when opening new browser from anapplet with command
getAppletContext().showDocument(new URL(htmlAddress + data), "AccountBalance");

Additionally how to pass the array to a servlet from the above HTML.
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Muhammed,
Please excuse me if I am interpreting your question wrongly, but if the URL you are interested in is that of a servlet, then in the "query" part of the URL, you can use the same parameter name more than once and give a different value each time, example:
http://my.domain.net/MyServlet?ARRAY=1&ARRAY=2&ARRAY=3
The method "getParameterValues()" (in "javax.servlet.ServletRequest") will return a three element array of "String"s. More details available in the javadoc:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html
Hope this helps you.
Good Luck,
Avi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic