File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Applet to use Servlet Context Object in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet to use Servlet Context Object in jsp" Watch "Applet to use Servlet Context Object in jsp" New topic

Applet to use Servlet Context Object in jsp

Bahadir Mert Uzan

Joined: Mar 27, 2009
Posts: 13
Hello My name is Mert from UK

I am trying to build an Applet that needs a list inside to run. I have a list that I build through mysql server in ServletContextListener
What i want to do is to get this list and put it into an applet. I know how to get context object but i dont know how to put it into applet.
Also I have no idea where to use applet other that putting JPanels inside them.
My only need is to display dynamic pictures from the list to the web browser and applet seems to
be the easiest of all.
I would very much appreached if you can write up some jsp and applet code, not single one of my examples are worthy to show.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Runnin on the client, the applet can't access objects that are part of the server. The easiest way would be transfer all information the applet needs in <param> tags inside the applet tag. See here for more detail on that.

I'm not quite sure what "display dynamic pictures from the list" means, but using JavaScript it's possible to load, display and change images in a web page on the fly. That would probably be a better user experience than an applet (if it can do what you need done).
Hugh Angle

Joined: Apr 15, 2009
Posts: 4
Is the list you want to pass to the applet of great length and complexity?

Hugh V. Angle
I agree. Here's the link:
subject: Applet to use Servlet Context Object in jsp
jQuery in Action, 3rd edition