File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Help needed! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Help needed!" Watch "Help needed!" New topic

Help needed!

Calanthe Wei
Ranch Hand

Joined: Oct 27, 2001
Posts: 42
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.
Brian Glodde
Ranch Hand

Joined: Jun 27, 2001
Posts: 171
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

Joined: Oct 27, 2001
Posts: 42
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.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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...
I agree. Here's the link:
subject: Help needed!
It's not a secret anymore!