Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed!

 
Calanthe Wei
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all
I am new here and I have a question about servlet.
Is that possibile the server can retun a applet instead of html file to the client?
Is yes, how can I do that?
Thank you in advance.
Calanthe
 
Brian Glodde
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you mean "can it present a return in the form of an applet", then yes it can. You have complete control of whats shown back to the client. Hopefully your applet already exists, otherwise it'll be very complex. Give us more detail on what you're trying to do and I am sure you'll receive tremendous advice.
 
Calanthe Wei
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Brain
Thank you so much!
Yes, I want a return in the form of an applet.
What I want to do is to creat a login servlet, and this is already done.After the user's login is verified, I want it bring the user an applet,
so that the user can communicate with the server (say editing the file in his folder on the server side)through the applet. And the applet is
almost done.
Any advice or comments on this?Thank you.
Calanthe
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have your servlet return a page of HTML with the appropriate <object> (or <applet> ) tags embedded.

You don't 'return' the bytecode of the applet. You return an HTML page that has codebase attributes, etc, etc...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic