>hi all,
>can somebody tell me what is the simplest way of calling an applet in a servlet.
>I have an applet with some map data (esri shape) and i wnat to display it
>when someone requests the url of my servlet.
 
>thanks in adv..
 
>anoop
 
 
 
 
sorry I just sent a empty email.  in your Servlet, you can genarate a html code
to invoke your Applet class. when I use TOMCAT, I put Applet class in
webapps/ROOT, from the following email, you also can put your Appet class
together with your Servlet class(inside your webapp)
 
 
good email :-)
---------------------------------------------------------------------------------------------------------------
Hi,
The codebase depends on how you setup your server directories ;)
I can only comment on what I like to do personally, so adopt this
as you see fit.
 
I like to set up a directory under my docbase, /applets.  Inside
are just symlinks pointing to the class files that I put under
the respective webapps WEB-INF/classes directories.  For example,
applet1->../WEB-INF/classes/org.mycompany.applet1File
 
Then my applet tags are typically things like:
 
<APPLET
  NAME=applet1
  CODE='org.mycompany.Applet1'
  CODEBASE='http://myserver:myport/mywebapp/applets'
  <PARAM tags etc... />
</APPLET>
 
Hopefully this helps,
 
Yoav
 
longinus wrote:
>
> how about codebase attribute?
>
> Yoav Shapira schrieb:
> >
> > Howdy,
> >
> > > > Do you know were applets should be put in TOMCAT server?
> > > >
> > >
> > > Applet is the kind of web documents like .html.
> > > I think that you can put applets together with other static documents.
> >
> > I would disagree with that ;)  The applets, per-se, are compiled
> > files (.class or maybe in a jar).  Furthermore, the applet must be
> > locatable by its fully-qualified class name, e.g. org.mycompany.foo.
> >
> > Accordingly, I would put the applet (if .class) in the WEB-INF/classes
> > directory, and if it's in a JAR file I'd put it in the WEB-INF/lib
> > directory.  The usual stuff applies about if you need them visible to
> > other apps, put in tomcat/lib, etc.
> >
> > Just my two cents ;)
> > Yoav
---------------------------------------------------------------------------------------------------------------
 
 
Bo
Nov.09, 2001
 

Reply via email to