aspose file tools
The moose likes JSP and the fly likes applet jsp communication Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "applet jsp communication" Watch "applet jsp communication" New topic
Author

applet jsp communication

Nidhi Nagre
Ranch Hand

Joined: Nov 05, 2007
Posts: 64
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
Marshal

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


Android appsImageJ pluginsJava web charts
Nidhi Nagre
Ranch Hand

Joined: Nov 05, 2007
Posts: 64
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

Joined: Aug 29, 2007
Posts: 212

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 ]

[Servlet tutorial] [Servlet 3.0 Cook Book]
Nidhi Nagre
Ranch Hand

Joined: Nov 05, 2007
Posts: 64
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: applet jsp communication
 
Similar Threads
applet jsp communication
How to restore form Data in Java
how to communicate Applet to Servet
Printing in JSP
Servlet to Applet