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. [EMAIL PROTECTED] Experience is what you get when you were expecting something else. - Original Message - From: Andreas Mohrig [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] 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-namemyServlet/servlet-name servlet-classcom.YourInstitution.servlet.myServlet/servlet-class /servlet servlet-mapping servlet-namemyServlet/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:[EMAIL PROTECTED]] 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:[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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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:[EMAIL PROTECTED]] 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. [EMAIL PROTECTED] Experience is what you get when you were expecting something else. - Original Message - From: Andreas Mohrig [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] 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-namemyServlet/servlet-name servlet-classcom.YourInstitution.servlet.myServlet/servlet-class /servlet servlet-mapping servlet-namemyServlet/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:[EMAIL PROTECTED]] 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:[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] -- 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]
Re: Mapping directory
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 [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] 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:[EMAIL PROTECTED]] 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. [EMAIL PROTECTED] Experience is what you get when you were expecting something else. - Original Message - From: Andreas Mohrig [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] 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-namemyServlet/servlet-name servlet-classcom.YourInstitution.servlet.myServlet/servlet-class /servlet servlet-mapping servlet-namemyServlet/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:[EMAIL PROTECTED]] 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:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]