RE: PATH issue
In Windows NT, just go into your environmental settings and add your path to the PATH statement. Right-click My Computer-properties-Advanced-Environmental Variables (Windows XP specific directions, but it's in a similar place on NT) - Andrew -Original Message- From: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 1:32 PM To: Tomcat (E-mail) Subject: PATH issue I have set up Tomcat with an addition to the PATH in startup.bat (set PATH=..\webapps\TestServlet\dll;%PATH%). When Tomcat starts from this batch file, the servlet can access files in this directory. However, when Tomcat runs as a service, the servlet can't access the files in this directory. Tomcat produces javax.servlet.ServletException and java.lang.UnsatisfiedLinkError messages. It seems the NT Tomcat service bypasses startup.bat. How can I set up the NT service to load the PATH statement above? Is this possible? Considering the nature of the product, I can't update the path manually in the Windows environment variables (although this does work). And I would like to keep the files inside the servlet, and not in the Tomcat\bin directory (I tried this and it works as well). What can I do? Thank you in advance for your help. Kyle Pearsall -- 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: PATH issue
How did you install the service? Chances are you need to add that to your service installation. -Original Message- From: Andrew Conrad [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 11:36 AM To: 'Tomcat Users List' Subject: RE: PATH issue In Windows NT, just go into your environmental settings and add your path to the PATH statement. Right-click My Computer-properties-Advanced-Environmental Variables (Windows XP specific directions, but it's in a similar place on NT) - Andrew -Original Message- From: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 1:32 PM To: Tomcat (E-mail) Subject: PATH issue I have set up Tomcat with an addition to the PATH in startup.bat (set PATH=..\webapps\TestServlet\dll;%PATH%). When Tomcat starts from this batch file, the servlet can access files in this directory. However, when Tomcat runs as a service, the servlet can't access the files in this directory. Tomcat produces javax.servlet.ServletException and java.lang.UnsatisfiedLinkError messages. It seems the NT Tomcat service bypasses startup.bat. How can I set up the NT service to load the PATH statement above? Is this possible? Considering the nature of the product, I can't update the path manually in the Windows environment variables (although this does work). And I would like to keep the files inside the servlet, and not in the Tomcat\bin directory (I tried this and it works as well). What can I do? Thank you in advance for your help. Kyle Pearsall -- 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: PATH issue
Hi Kyle Run the following code in your servlet. ServletContext sc = getServletContext(); String RootPath = sc.getRealPath(/); This will return the path where the context is. Ie: $TOMCAT_HOME/webapps/yourapp This will work in all situations no matter where your app is installed Hope this helps Donie -Original Message- From: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 18:32 To: Tomcat (E-mail) Subject:PATH issue I have set up Tomcat with an addition to the PATH in startup.bat (set PATH=..\webapps\TestServlet\dll;%PATH%). When Tomcat starts from this batch file, the servlet can access files in this directory. However, when Tomcat runs as a service, the servlet can't access the files in this directory. Tomcat produces javax.servlet.ServletException and java.lang.UnsatisfiedLinkError messages. It seems the NT Tomcat service bypasses startup.bat. How can I set up the NT service to load the PATH statement above? Is this possible? Considering the nature of the product, I can't update the path manually in the Windows environment variables (although this does work). And I would like to keep the files inside the servlet, and not in the Tomcat\bin directory (I tried this and it works as well). What can I do? Thank you in advance for your help. Kyle Pearsall -- 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: PATH issue
No promises, but it would be interesting if you created a key for tomcat.exe in: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths -Original Message- From: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Sent: 10 July, 2002 11:32 AM To: Tomcat (E-mail) Subject: PATH issue I have set up Tomcat with an addition to the PATH in startup.bat (set PATH=..\webapps\TestServlet\dll;%PATH%). When Tomcat starts from this batch file, the servlet can access files in this directory. However, when Tomcat runs as a service, the servlet can't access the files in this directory. Tomcat produces javax.servlet.ServletException and java.lang.UnsatisfiedLinkError messages. It seems the NT Tomcat service bypasses startup.bat. How can I set up the NT service to load the PATH statement above? Is this possible? Considering the nature of the product, I can't update the path manually in the Windows environment variables (although this does work). And I would like to keep the files inside the servlet, and not in the Tomcat\bin directory (I tried this and it works as well). What can I do? Thank you in advance for your help. Kyle Pearsall -- 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: PATH issue
It is platform independent, but not guaranteed to work in the case that your webapp is running directly out of a .war file. In that case, doing sc.getRealPath(/) will return null since the app does not exist on the file system. So, as long as you make sure that your app is deployed from a directory directly off the filesystem, you are good as gold. Just make sure to do a null check on the result of getRealPath(/) just to make sure. Jake At 06:38 PM 7/10/2002 +0100, you wrote: By the way, it's also platform independent ;) Donie -Original Message- From: Donie Kelly [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 18:32 To: 'Tomcat Users List' Subject:RE: PATH issue Hi Kyle Run the following code in your servlet. ServletContext sc = getServletContext(); String RootPath = sc.getRealPath(/); This will return the path where the context is. Ie: $TOMCAT_HOME/webapps/yourapp This will work in all situations no matter where your app is installed Hope this helps Donie -Original Message- From: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 18:32 To: Tomcat (E-mail) Subject:PATH issue I have set up Tomcat with an addition to the PATH in startup.bat (set PATH=..\webapps\TestServlet\dll;%PATH%). When Tomcat starts from this batch file, the servlet can access files in this directory. However, when Tomcat runs as a service, the servlet can't access the files in this directory. Tomcat produces javax.servlet.ServletException and java.lang.UnsatisfiedLinkError messages. It seems the NT Tomcat service bypasses startup.bat. How can I set up the NT service to load the PATH statement above? Is this possible? Considering the nature of the product, I can't update the path manually in the Windows environment variables (although this does work). And I would like to keep the files inside the servlet, and not in the Tomcat\bin directory (I tried this and it works as well). What can I do? Thank you in advance for your help. Kyle Pearsall -- 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: PATH issue
There is no platform independent manner to specify JNI code library locations. -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED]] Sent: 10 July, 2002 9:54 PM To: Tomcat Users List Subject: RE: PATH issue It is platform independent, but not guaranteed to work in the case that your webapp is running directly out of a .war file. In that case, doing sc.getRealPath(/) will return null since the app does not exist on the file system. So, as long as you make sure that your app is deployed from a directory directly off the filesystem, you are good as gold. Just make sure to do a null check on the result of getRealPath(/) just to make sure. Jake At 06:38 PM 7/10/2002 +0100, you wrote: By the way, it's also platform independent ;) Donie -Original Message- From: Donie Kelly [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 18:32 To: 'Tomcat Users List' Subject:RE: PATH issue Hi Kyle Run the following code in your servlet. ServletContext sc = getServletContext(); String RootPath = sc.getRealPath(/); This will return the path where the context is. Ie: $TOMCAT_HOME/webapps/yourapp This will work in all situations no matter where your app is installed Hope this helps Donie -Original Message- From: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 18:32 To: Tomcat (E-mail) Subject:PATH issue I have set up Tomcat with an addition to the PATH in startup.bat (set PATH=..\webapps\TestServlet\dll;%PATH%). When Tomcat starts from this batch file, the servlet can access files in this directory. However, when Tomcat runs as a service, the servlet can't access the files in this directory. Tomcat produces javax.servlet.ServletException and java.lang.UnsatisfiedLinkError messages. It seems the NT Tomcat service bypasses startup.bat. How can I set up the NT service to load the PATH statement above? Is this possible? Considering the nature of the product, I can't update the path manually in the Windows environment variables (although this does work). And I would like to keep the files inside the servlet, and not in the Tomcat\bin directory (I tried this and it works as well). What can I do? Thank you in advance for your help. Kyle Pearsall -- 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: PATH issue
Sorry, I guess I just read the reply to the original message dealing with getRealPath(/) and not the original message. I know next to nothing about dealing with JNI. You may very well be right that there is no platform independent manner to deal with the JNI Paths. Jake At 10:07 PM 7/10/2002 -0600, you wrote: There is no platform independent manner to specify JNI code library locations. -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED]] Sent: 10 July, 2002 9:54 PM To: Tomcat Users List Subject: RE: PATH issue It is platform independent, but not guaranteed to work in the case that your webapp is running directly out of a .war file. In that case, doing sc.getRealPath(/) will return null since the app does not exist on the file system. So, as long as you make sure that your app is deployed from a directory directly off the filesystem, you are good as gold. Just make sure to do a null check on the result of getRealPath(/) just to make sure. Jake At 06:38 PM 7/10/2002 +0100, you wrote: By the way, it's also platform independent ;) Donie -Original Message- From: Donie Kelly [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 18:32 To: 'Tomcat Users List' Subject:RE: PATH issue Hi Kyle Run the following code in your servlet. ServletContext sc = getServletContext(); String RootPath = sc.getRealPath(/); This will return the path where the context is. Ie: $TOMCAT_HOME/webapps/yourapp This will work in all situations no matter where your app is installed Hope this helps Donie -Original Message- From: Pearsall, Kyle [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 18:32 To: Tomcat (E-mail) Subject:PATH issue I have set up Tomcat with an addition to the PATH in startup.bat (set PATH=..\webapps\TestServlet\dll;%PATH%). When Tomcat starts from this batch file, the servlet can access files in this directory. However, when Tomcat runs as a service, the servlet can't access the files in this directory. Tomcat produces javax.servlet.ServletException and java.lang.UnsatisfiedLinkError messages. It seems the NT Tomcat service bypasses startup.bat. How can I set up the NT service to load the PATH statement above? Is this possible? Considering the nature of the product, I can't update the path manually in the Windows environment variables (although this does work). And I would like to keep the files inside the servlet, and not in the Tomcat\bin directory (I tried this and it works as well). What can I do? Thank you in advance for your help. Kyle Pearsall -- 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]