Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / January 2006

Tip: Looking for answers? Try searching our database.

applet talking to server (with ajax?)

Thread view: 
chuck - 29 Jan 2006 21:35 GMT
Hi,

I have an applet that i want to have grab text from the server.  I
have a php function that generates the text, right now just plain
text, but it could be anything xml, json, etc.

  anyway, what is the best thing for me to do to have the applet
communicate with the php function on the server?

All the recent sun articles seem to deal with the opposite of what
i want,  java server talking to a standard html page through ajax

Chuck
Lothar Kimmeringer - 29 Jan 2006 22:21 GMT
>    anyway, what is the best thing for me to do to have the applet
> communicate with the php function on the server?

Using
new URL("http://myserver/path/phppage.php").openConnection
and use the returned URLConnection for reading the PHP-
page's output.

Regards, Lothar
Signature

Lothar Kimmeringer                E-Mail: spamfang@kimmeringer.de
              PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
                questions!

Fabien Bergeret - 30 Jan 2006 10:44 GMT
> Hi,
>
[quoted text clipped - 9 lines]
>
> Chuck
To summerize : you have a web application, in which you want your client
to retrieve data from the server and to display it dynamically.
Using an applet implies that the client has a java plugin installed on
his computer, which is not always the case.
In both the cases, you'll need to have javascript code which will
display your retrieved data.
I'd say that the Ajax solution seems to be the best : doesn't need extra
requirements, minimize the number of different technologies used ...


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.