> -----Original Message-----
> From: Taral Shah [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 16, 2002 4:32 AM
> To: Tomcat Users List
> Subject: Re: Root Context Problem
>
>
> but suppose my two different servlets needs to load the
> library then what
> should i do.
put the class that loads your library into /common/lib and it will only be
loaded once and shared by all contexts/servlets that need it.
> Also the same question stays there, Why am I able to execute
> the code if i
> write the context path in url(I mean i am able to load the
> dll second time)
> Also there isnt any method to unload the dll(as far as I
> know), then what
> should be the possible solution?
>
There is no way to unload a library in java. You have to stop and restart
the JVM.
Charlie
> Thanks
> Taral Shah
> ----- Original Message -----
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>; "Taral Shah"
> <[EMAIL PROTECTED]>
> Sent: Friday, August 16, 2002 1:14 PM
> Subject: Re: Root Context Problem
>
>
>
>
> On Fri, 16 Aug 2002, Taral Shah wrote:
>
> > Date: Fri, 16 Aug 2002 13:08:23 +0530
> > From: Taral Shah <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
> > Taral Shah <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Re: Root Context Problem
> >
> > You may be right but then as I wrote in the mail if i send
> request as
> > http://<ip>/network/cgi/tjs/myexe.exe?abc then it works,
> loads dll and
> > displays the data.
> >
> > and if i send request as http://<ip>/cgi/tjs/myexe.exe?abc
> then it gives
> > error.
> > So i think its something with configuration problem for tomcat.
> > I have made network as my default web context.
> >
>
> The problem with that theory is that Tomcat *never* loads
> *any* DLL files
> on its own. The only way that can happen is if your
> application does it,
> by calling Runtime.loadLibrary() or something like that. Its
> up to your
> app to ensure that this happens once and only once for the
> lifetime of a
> JVM.
>
> > Thanks
> > Taral Shah
>
> Craig
>
>
> >
> > ----- Original Message -----
> > From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>;
> "Taral Shah"
> > <[EMAIL PROTECTED]>
> > Cc: "Josh" <[EMAIL PROTECTED]>
> > Sent: Friday, August 16, 2002 12:58 PM
> > Subject: Re: Root Context Problem
> >
> >
> >
> >
> > On Fri, 16 Aug 2002, Taral Shah wrote:
> >
> > > Date: Fri, 16 Aug 2002 09:36:23 +0530
> > > From: Taral Shah <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
> > > Taral Shah <[EMAIL PROTECTED]>
> > > To: Tomcat Users List <[EMAIL PROTECTED]>,
> > > Josh <[EMAIL PROTECTED]>
> > > Subject: Root Context Problem
> > >
> > > Hi,
> > > I have posted this sort of problem before but didnt get
> any answer. Now
> I
> > > have found the root casue for my problem, I request you
> all to please
> > guide
> > > me.
> > >
> > > I am having a particular client requirement where he send
> the url as
> shown
> > > below:
> > > http://<ip>/cgi/tjs/myexe.exe?abc
> > >
> > > Now I am able to redirect /cgi/tjs/myexe.exe request to
> my servlet with
> > > servlet mapping but Here It gives me the dll error.
> > > My servlet is loading one dll, and when this code gets
> executed it gives
> > me
> > > error ...dll already loaded.
> > >
> > > My context is something like<network> and If i dont make
> it default
> > context
> > > and send request as
> > > http://<ip>/network/cgi/tjs/myexe.exe?abc then I dont get
> this error.
> > > but if i send request as shown at top then it fives me
> error. I tried to
> > put
> > > my servlet in the ROOT context but still getting same error.
> > >
> > > Does any one have any idea regarding this?
> > >
> >
> > This isn't a Tomcat issue -- it is a restriction of most
> Java JVMs that
> > you can only load a single DLL once in the lifetime of a
> JVM. It is up to
> > your application to ensure that this restriction is met (or
> to ignore the
> > exception if your app tries to load a DLL more than once anyway).
> >
> > > Thanks
> > > Taral Shah
> > > Software Engineer,
> > > Contech Software Ltd.
> > > [EMAIL PROTECTED]
> > >
> >
>
> >
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>