• Post Reply Bookmark Topic Watch Topic
  • New Topic

applet jsp communication  RSS feed

 
Nidhi Nagre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • 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
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!