tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taral Shah" <tar...@contechsoftware.com>
Subject Re: Mapping directory
Date Wed, 14 Aug 2002 09:20:39 GMT
Hi,
Vq server is the server to execute cgi.
In that cgi, I was just calling servlet by opening a socket through cgi.
That servlet loads the dll and sends data back to cgi. cgi prints the data
on browser.
Now here in this case , i aint using any cgi, All exe extensions are mapped
to servlet so I dont need any more cgi.
Thus in both cases servlet was playing major part, it was loading the dll
but in later case(i.e. mapping directory case) its giving the error.  Even
if i open new browser still it gives me same error but when, I restart
tomcat it works fine.

If any one has faced such problem then pl. help me(the problem is mentioned
in the mails shown below)

Thanks

Taral Shah

----- Original Message -----
From: "Andreas Mohrig" <andreas.mohrig@cadooz.de>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, August 14, 2002 2:29 PM
Subject: RE: Mapping directory


I'm afraid I don't have any expertise whatsoever concerning vq server, and
don't have to trouble with loading dlls either (all my servers run under
unix). But my guess would be that vq server somehow knows which dll it has
already loaded and refrains from loading it again, whereas tomcat does not
check for this. Maybe you can figure out a way to determine if the dll has
already been loaded (or which dlls are present in the system) and make the
loading dependent on the outcome of this check. It would be a good idea to
make this thread-safe as well, i.e. to use some kind of locking mechanism.

Alternatively you could place an object in application scope to indicate if
the dll has already been loaded (by your servlet) if you do not get access
to the information about which dlls are already present in the system and if
you are sure that your servlet/application is the only one loading this
particular dll. If you initialize this object with an form of
application-initialization-servlet during startup, you could use it as a
semaphore (synchronization object / monitor) as well.

I'm not aware of any standard mechanism helping with such problems.

Hope that helps.

Andreas Mohrig

-----Original Message-----
From: Taral Shah [mailto:tarals@contechsoftware.com]
Sent: Wednesday, August 14, 2002 10:06 AM
To: Tomcat Users List
Subject: Re: Mapping directory


Hi Andreas,

Thanks a lot for your solution. It worked for me.
I did the exact same thing and its working perfectly.

Now I am facing some typical problem, In my application peviously cgi file
was running with vqserver as cgi server.
Now When I mapped directory specified by you, I am able to run the
application but it throws native library error some times.
I am loading dll in my application, And when I excute the servlet it gives
me error that dll is already loaded,

If i restart tomcat it works fine. Surprsingly this error doesnot come with
older specifications.
i.e. running with vq server+tomcat.

Has anybody having any idea for loading dll problem in tomcat.

Thanks
Taral Shah
Software Engineer,
Contech Software Ltd.
tarals@contechsoftware.com

Experience is what you get when you were expecting something else.

----- Original Message -----
From: "Andreas Mohrig" <andreas.mohrig@cadooz.de>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, August 13, 2002 5:42 PM
Subject: AW: Mapping directory


If your context happens to be "cgi" that should be possible. Put something
like this in your web.xml:

    <servlet>
        <servlet-name>myServlet</servlet-name>
        <servlet-class>com.YourInstitution.servlet.myServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>myServlet</servlet-name>
        <url-pattern>/vq/ca.exe</url-pattern>
    </servlet-mapping>

Otherwise the only solution I know is to use the URL rewriting capabilities
of a webserver such as apache and forward the requests in questing
(e.g. via mod_jk) to Tomcat. I would be interested in a way to get rid off
the
sometimes unnecessary context-prefix myself.

Andreas Mohrig

-----Urspr√ľngliche Nachricht-----
Von: Taral Shah [mailto:tarals@contechsoftware.com]
Gesendet: Dienstag, 13. August 2002 13:33
An: Tomcat Users List
Betreff: Mapping directory


Is it possible to map path in topmcat.

I mean If i have request coming like
http://ip:8080/cgi/vq/ca.exe?abc

Can I redirect this request to
http://ip:8080/<context>/servlet/myServlet?abc

Is it possible  with just configuring tomcat.

Thanks
Taral Shah






--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message