• 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

applet jsp communication

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
i am very new in java so please spend your few movement for this topic.
i want to run a jsp page from within an applet and evantually want to send data to jsp.

please help me with approppiate code that you have used using HttpPost and HttpGet method both.
the data is an array of string object or may be a properties object,

the url of the jsp is
Registrationform.jsp
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello "helpNidhi OnJava"-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, assuming that "run a JSP page" means accessing it programmatically, check out the java.net.URL examples at exampledepot.com, particularly #135 and #136. Those show POST and GET in action, respectively. For GET, the URL can contain parameters.
 
Nidhi Nagre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Mr Ulf and sorry for using a fictitous name that has been updated now.

now i am going in your way.
 
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the code which you can use to communication between applet and servlet/JSP

following code can be used at applet side :

[ November 05, 2007: Message edited by: sudhir nim ]
 
Nidhi Nagre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Mr sudhir

i think i have been using almost the same code for that..but i haven't written any code inside the target jsp(to which i want to cummunicate) so for.
is it compulsory to write the code bothside(applet and jsp),in fact i will do it latter.




after working with this i got the follwing exception
java.lang.IllegalStateException: Already connected
i looked around this but couldn't able to solve.

guide me to make a successful connection
 
Just the other day, I was thinking ... about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic