The Artima Developer Community
Sponsored Link

Java Answers Forum
applet contact servlet

4 replies on 1 page. Most recent reply: Aug 3, 2003 12:31 PM by Charles Bell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Kim Son

Posts: 7
Nickname: zhinshan
Registered: Jul, 2003

applet contact servlet Posted: Jul 30, 2003 8:34 PM
Reply to this message Reply
Advertisement
I have finished first tutorial to create simple applet and servlet in jbuilder.
I want to develop applet that call a function (e.g, get image) and the servlet sending image to the applet, But I do not know how to make the it. please help me and show me where I get help from internet and jbuilder or the "key" i would searching. Thanks
my mail : zhinshan@yahoo.com


David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: applet contact servlet Posted: Jul 31, 2003 6:18 AM
Reply to this message Reply
This isn't a simple project, so I'd suggest that you do more than two tutorials before trying...

...but what you basically have to do is write a Servlet which returns an image file. Then simply get the Applet to invoke the servlet and thus receive the image.

Like I said, this isn't trivial and there are security issues which will probably need to be addressed.

K. Hodel

Posts: 8
Nickname: hodeka104
Registered: Jul, 2003

applet-servlet communication Posted: Jul 31, 2003 7:42 AM
Reply to this message Reply
You might try searching with

applet servlet communication

I tried that in Google and found an example that I think might be of use to you - http://www.frank-buss.de/echoservlet/ (applet-servlet communication via objects)

Kim Son

Posts: 7
Nickname: zhinshan
Registered: Jul, 2003

Re: applet-servlet communication Posted: Aug 1, 2003 2:39 AM
Reply to this message Reply
Thank you very much for answers, I am continue..

Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: applet contact servlet Posted: Aug 3, 2003 12:31 PM
Reply to this message Reply
The servlet has to set the content type to the correct mime type and then send the file to the servlet output stream.

The applet must originate from the same server that the servlet is on and open a connection to the servlet via its url, make a request and read the response.

Flat View: This topic has 4 replies on 1 page
Topic: What is it doing ?! Previous Topic   Next Topic Topic: MENU help

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use