Re: IWA username using JSP for Already authenticated Window system
>> >> One thing to watch for is that the client must use Kerberos and not >> NTLM (it's a guess but it seems logical) . > > > Sorry to burst in, but can you elaborate on that ? > Why does it seem logical ? To my own (admittedly limited) knowledge, > Kerberos is not the most widely implemented solution in Windows networks, > NTLMv2 is. Does the SPNEGO implementation in Tomcat not work with NTLMv2 > then ? > Only on a linux box. In my mind, NTLM being a Microsoft protocol, the chance of it working on a linux box was small. That is what I observed. When the tomcat on my linux was configured with the SPNEGO valve, at first my browser was talking NTLM (apparently, you can see that when the first reponse to the negotiate challenge begins with NTRLM...), and I got an error in tomcat log saying can't validate client ticket. Once i declared the box in the active directory dns, my browser stopped using NTLM for Kerberos and everything works as expected. It should be apparent I'm really not an expert on that, so all that is just some guesses. I'm still studying all that. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: runtime.exec "cmd.exe /C net use"
On Mon, Mar 25, 2013 at 8:05 PM, Patrick Flaherty wrote: > > I did not know you could have multiple logins in Windows 2008 R2. You > don't mean interactive login do you? > > When I first started using Windows Server 2008 (standard/vista version), I had multiple 'local' users, and the server allowed at least 2 users to be logged in at one time, and I think I remember the ability to switch between users via Ctrl-Alt-Delete and/or via Ctrl-L (lock workstation). I would assume the same is available for Windows Server 2008 R2, but have not tried it. did a google search and found this[1]. can you do something similar, create a separate java app/executable that does your 'net use', and let your tomcat7-app-running-as-service call the separate app, and 'run as' the target user that has the network drive list that you desire to get/retrieve? just a suggestion. [1] http://stackoverflow.com/questions/1385866/java-run-as-administrator
Re: runtime.exec "cmd.exe /C net use"
On Mon, Mar 25, 2013 at 7:13 PM, Harris, Jeffrey E. < jeffrey.har...@mantech.com> wrote: > > You are on a Windows 7 system, which supports one user logged in at a time. > I would be interested in seeing how this behaves on a Windows Server 2008 > R2 system, > configured for multiple users to be logged on at the same time (the > default for remote > administration mode is one user at a time). I do believe this is an > artifact of the > Windows 7 architecture (one user at a time) because Windows Server 2008 R2 > has different > "security zones" (rings) in its kernel implementation for access by > different components > (services, drivers, and users) which affect the presentation to the user. > First of all, interesting/nice response! I have Windows Server 2008 R2 (hosting tomcat7/tomee, which is running my java/JSF web app), but I currently do not have the server on-or-connected-to any domain (at the moment, and currently there is no need/requirement for it to be connected to the current Windows domain on the network); my Windows Server 2003 R2 server is currently (and has been...for years) running as the domain controller on the network. So, my Windows Server 2008 R2 server is currently not configured to test this and provide test results. > Also, persistent mappings are user specific. So if usera has two > persistent drive mappings and > userb has three different persistent mappings, usera will see his two when > he is logged on and > userb will see his three when he is logged on. Do you have the same > persistent mappings for dt-user > and service-user? You have also stated that you see no mapped drives when > you run the service, so > it seems as though starting the service first (and never having anyone > logged in or dt-user) is an exception. > Therefore, by extension of what you said above, you only receive the > mapped drives if > 1) the service starts first and then the service account logs in > interactively, or > 2) the service starts after logging in with the service account. Did you > try both of these? > But once the service "sees" the mappings, it retains it until: the > service restarts? Does > it matter whether the service restarts with someone logged on (i.e., the > service account) or no one > logged in? > > I do not think that you have explored all of the conditions required for > the service to maintain > its mappings, and that may be fine for your application, but then again, > it may not be. That is > for you to decide. > > Jeffrey Harris > > This e-mail and any attachments are intended only for the use of the > addressee(s) named herein and may contain proprietary information. If you > are not the intended recipient of this e-mail or believe that you received > this email in error, please take immediate action to notify the sender of > the apparent error by reply e-mail; permanently delete the e-mail and any > attachments from your computer; and do not disseminate, distribute, use, or > copy this message and any attachments. > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Tomcat 6 centos 5 64 Bit
-- Hello, I have setup tomcat6 on port 8080 using 64 bit- Centos 5. I am able to see the default tomcat page, but if I try to go to the webadmin gui (and yes have set my gui-web admin user, etc in server.xml) and or geoserver web app it says connection timed out. Thus, I usually restart tomcat and am able to connect to geoserver, but as soon as i try to login then i get the no connection message and can only access the localhost:8080 page again. Cheers, Sean Conway GIS Specialist scconw...@gmail.com
Re: runtime.exec "cmd.exe /C net use"
On Mon, Mar 25, 2013 at 10:10 PM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: > On Mon, Mar 25, 2013 at 6:57 PM, Patrick Flaherty > wrote: > >> >> On Mar 25, 2013, at 1:15 PM, Howard W. Smith, Jr. wrote: >> >> On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty >>> **wrote: >>> >>> Update: If I'm login interactively (meaning machine boots and I login and get my desktop) and that interactive account matches the service login account then "net use" from within the service does return all mapped drives. I expected as much. It seems as though you cannot get away from the >>> requirement of having to login 'first'...to get everything working as >>> designed/expected in your app. >>> >>> Excuse me, if I missed the business requirement specification (earlier in >>> this conversation), but is the requirement only to get a list of mapped >>> drives for 'your' user login or any enduser that logs into the production >>> server/client/PC/machine? >>> >>> can you add the list of network drives to a database table, and maintain >>> the database table and retrieve the list from that database table via the >>> tomcat-app-running-as-service? >>> >>> if you only need a list of mapped network drives for your user login, can >>> you just maintain a 'file' that has this list on the target/production >>> server, and whenever it changes, can you update the file, and make the >>> topcat-app-running-as-service to always read the file instead of having >>> to >>> call 'net use'? >>> >>> IMHO and FWIW, i would never go with the approach of relying on a windows >>> 'command line' to do this/that for me. yes, in my app, i allow endusers >>> to >>> update files/documents, and the app saves the files/documents to a >>> certain >>> folder on the server, and my app will list those files on a web page, and >>> they can view/download those files from/via the web app... all that is >>> done >>> via java instead of doing a 'cmd.exe dir'. i'm new to java, always wanted >>> to be java developer, and loving what i can do with java. i'm almost >>> getting to the point, where my days of a 'windows user' are done... one >>> day, i hope to migrate to linux for target server instead of windows >>> server. :) >>> >> >> This is what I see. If my service logs in as "service-user" and I login >> normally to my desktop as "dt-user". >> I call "net use" from my service and get an empty list. Now I logout as >> "dt-user"and login as "service-user" and I mapped >> 4 drives and only 2 of the drives are mapped persisted (i.e. reconnect at >> logon). I logout as "service-user" and >> now I have my app call "net use" programatically and it returns the 2 >> drives that were mapped with persistence. >> Conclusion: Whatever drives are mapped persisted when logged in as the >> user the service logs in as, then your >> app can call "net use" and get those drives returned from "net use" even >> if your logged in as "dt-user" OR nobody >> is logged in at all >> >> Maybe someone can confirm my finding, but this is what I see. >> >> > Your findings are all good; reading and digesting and wanting to > respond/participate since I'm definitely a developer using/deploying-app to > Windows/tomcat7 . :) > > If you could provide a WAR (little test app), I would be more than willing > to give this a shot on my Windows Server 2008 64-bit (standard/Vista) > development server and maybe even try it on my Windows Server 2008 R2 > 64-bit (R2 = Windows 7, from what I understand), but I'd have to setup a > Windows user/environment for this...to mimic what you're doing. > > Now, onto the other responses. :) > > Sorry, I was going to say, I still would develop some type of batch file or some type of app that could run when user logs out of the machine...that will do a 'net use > \someDriveLetter\someFolder\someFile.txt', and I would make sure the app reads that file instead of going through the procedure of logging in as a certain user, logging out, and then running your tomcat-app-as-service...just so the app can reliably call 'net use' and get the expected/desired output. maybe i should have written this response against the last email that you sent. :) > >> Thanks again >> Pat >> >> >> >> >> >> >> --**--**- >> To unsubscribe, e-mail: >> users-unsubscribe@tomcat.**apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> >
Re: runtime.exec "cmd.exe /C net use"
On Mon, Mar 25, 2013 at 6:57 PM, Patrick Flaherty wrote: > > On Mar 25, 2013, at 1:15 PM, Howard W. Smith, Jr. wrote: > > On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty >> **wrote: >> >> Update: If I'm login interactively (meaning machine boots and I login and >>> get my desktop) and that interactive account matches the service login >>> account >>> then "net use" from within the service does return all mapped drives. >>> >>> >>> I expected as much. It seems as though you cannot get away from the >> requirement of having to login 'first'...to get everything working as >> designed/expected in your app. >> >> Excuse me, if I missed the business requirement specification (earlier in >> this conversation), but is the requirement only to get a list of mapped >> drives for 'your' user login or any enduser that logs into the production >> server/client/PC/machine? >> >> can you add the list of network drives to a database table, and maintain >> the database table and retrieve the list from that database table via the >> tomcat-app-running-as-service? >> >> if you only need a list of mapped network drives for your user login, can >> you just maintain a 'file' that has this list on the target/production >> server, and whenever it changes, can you update the file, and make the >> topcat-app-running-as-service to always read the file instead of having to >> call 'net use'? >> >> IMHO and FWIW, i would never go with the approach of relying on a windows >> 'command line' to do this/that for me. yes, in my app, i allow endusers to >> update files/documents, and the app saves the files/documents to a certain >> folder on the server, and my app will list those files on a web page, and >> they can view/download those files from/via the web app... all that is >> done >> via java instead of doing a 'cmd.exe dir'. i'm new to java, always wanted >> to be java developer, and loving what i can do with java. i'm almost >> getting to the point, where my days of a 'windows user' are done... one >> day, i hope to migrate to linux for target server instead of windows >> server. :) >> > > This is what I see. If my service logs in as "service-user" and I login > normally to my desktop as "dt-user". > I call "net use" from my service and get an empty list. Now I logout as > "dt-user"and login as "service-user" and I mapped > 4 drives and only 2 of the drives are mapped persisted (i.e. reconnect at > logon). I logout as "service-user" and > now I have my app call "net use" programatically and it returns the 2 > drives that were mapped with persistence. > Conclusion: Whatever drives are mapped persisted when logged in as the > user the service logs in as, then your > app can call "net use" and get those drives returned from "net use" even > if your logged in as "dt-user" OR nobody > is logged in at all > > Maybe someone can confirm my finding, but this is what I see. > > Your findings are all good; reading and digesting and wanting to respond/participate since I'm definitely a developer using/deploying-app to Windows/tomcat7 . :) If you could provide a WAR (little test app), I would be more than willing to give this a shot on my Windows Server 2008 64-bit (standard/Vista) development server and maybe even try it on my Windows Server 2008 R2 64-bit (R2 = Windows 7, from what I understand), but I'd have to setup a Windows user/environment for this...to mimic what you're doing. Now, onto the other responses. :) > Thanks again > Pat > > > > > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@tomcat.**apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: runtime.exec "cmd.exe /C net use"
On Mar 25, 2013, at 7:13 PM, Harris, Jeffrey E. wrote: -Original Message- From: Patrick Flaherty [mailto:pflah...@rampageinc.com] Sent: Monday, March 25, 2013 6:58 PM To: Tomcat Users List Subject: Re: runtime.exec "cmd.exe /C net use" On Mar 25, 2013, at 1:15 PM, Howard W. Smith, Jr. wrote: On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty wrote: Update: If I'm login interactively (meaning machine boots and I login and get my desktop) and that interactive account matches the service login account then "net use" from within the service does return all mapped drives. I expected as much. It seems as though you cannot get away from the requirement of having to login 'first'...to get everything working as designed/expected in your app. Excuse me, if I missed the business requirement specification (earlier in this conversation), but is the requirement only to get a list of mapped drives for 'your' user login or any enduser that logs into the production server/client/PC/machine? can you add the list of network drives to a database table, and maintain the database table and retrieve the list from that database table via the tomcat-app-running-as-service? if you only need a list of mapped network drives for your user login, can you just maintain a 'file' that has this list on the target/production server, and whenever it changes, can you update the file, and make the topcat-app-running-as-service to always read the file instead of having to call 'net use'? IMHO and FWIW, i would never go with the approach of relying on a windows 'command line' to do this/that for me. yes, in my app, i allow endusers to update files/documents, and the app saves the files/documents to a certain folder on the server, and my app will list those files on a web page, and they can view/download those files from/via the web app... all that is done via java instead of doing a 'cmd.exe dir'. i'm new to java, always wanted to be java developer, and loving what i can do with java. i'm almost getting to the point, where my days of a 'windows user' are done... one day, i hope to migrate to linux for target server instead of windows server. :) This is what I see. If my service logs in as "service-user" and I login normally to my desktop as "dt-user". I call "net use" from my service and get an empty list. Now I logout as "dt-user"and login as "service-user" and I mapped 4 drives and only 2 of the drives are mapped persisted (i.e. reconnect at logon). I logout as "service-user" and now I have my app call "net use" programatically and it returns the 2 drives that were mapped with persistence. Conclusion: Whatever drives are mapped persisted when logged in as the user the service logs in as, then your app can call "net use" and get those drives returned from "net use" even if your logged in as "dt-user" OR nobody is logged in at all Maybe someone can confirm my finding, but this is what I see. Thanks again Pat You are on a Windows 7 system, which supports one user logged in at a time. I would be interested in seeing how this behaves on a Windows Server 2008 R2 system, configured for multiple users to be logged on at the same time (the default for remote administration mode is one user at a time). I do believe this is an artifact of the Windows 7 architecture (one user at a time) because Windows Server 2008 R2 has different "security zones" (rings) in its kernel implementation for access by different components (services, drivers, and users) which affect the presentation to the user. Also, persistent mappings are user specific. So if usera has two persistent drive mappings and userb has three different persistent mappings, usera will see his two when he is logged on and userb will see his three when he is logged on. Do you have the same persistent mappings for dt-user and service-user? You have also stated that you see no mapped drives when you run the service, so it seems as though starting the service first (and never having anyone logged in or dt-user) is an exception. Therefore, by extension of what you said above, you only receive the mapped drives if 1) the service starts first and then the service account logs in interactively, or 2) the service starts after logging in with the service account. Did you try both of these? But once the service "sees" the mappings, it retains it until: the service restarts? Does it matter whether the service restarts with someone logged on (i.e., the service account) or no one logged in? I do not think that you have explored all of the conditions required for the service to maintain its mappings, and that may be fine for your application, but then again, it may not be. That is for you to decide. Jeffrey Harris After the the drives are mapped persisted by the "service-user", I reboot the computer and have nobody login interactively and my app sees all drives that were mapped p
RE: runtime.exec "cmd.exe /C net use"
> -Original Message- > From: Patrick Flaherty [mailto:pflah...@rampageinc.com] > Sent: Monday, March 25, 2013 6:58 PM > To: Tomcat Users List > Subject: Re: runtime.exec "cmd.exe /C net use" > > > On Mar 25, 2013, at 1:15 PM, Howard W. Smith, Jr. wrote: > > > On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty > > wrote: > > > >> Update: If I'm login interactively (meaning machine boots and I > login > >> and get my desktop) and that interactive account matches the service > >> login account then "net use" from within the service does return all > >> mapped drives. > >> > >> > > I expected as much. It seems as though you cannot get away from the > > requirement of having to login 'first'...to get everything working as > > designed/expected in your app. > > > > Excuse me, if I missed the business requirement specification > (earlier > > in this conversation), but is the requirement only to get a list of > > mapped drives for 'your' user login or any enduser that logs into the > > production server/client/PC/machine? > > > > can you add the list of network drives to a database table, and > > maintain the database table and retrieve the list from that database > > table via the tomcat-app-running-as-service? > > > > if you only need a list of mapped network drives for your user login, > > can you just maintain a 'file' that has this list on the > > target/production server, and whenever it changes, can you update the > > file, and make the topcat-app-running-as-service to always read the > > file instead of having to call 'net use'? > > > > IMHO and FWIW, i would never go with the approach of relying on a > > windows 'command line' to do this/that for me. yes, in my app, i > allow > > endusers to update files/documents, and the app saves the > > files/documents to a certain folder on the server, and my app will > > list those files on a web page, and they can view/download those > files > > from/via the web app... all that is done via java instead of doing a > > 'cmd.exe dir'. i'm new to java, always wanted to be java developer, > > and loving what i can do with java. i'm almost getting to the point, > > where my days of a 'windows user' are done... > > one > > day, i hope to migrate to linux for target server instead of windows > > server. :) > > This is what I see. If my service logs in as "service-user" and I login > normally to my desktop as "dt-user". > I call "net use" from my service and get an empty list. Now I logout as > "dt-user"and login as "service-user" and I mapped > 4 drives and only 2 of the drives are mapped persisted (i.e. reconnect > at logon). I logout as "service-user" and now I have my app call "net > use" programatically and it returns the 2 drives that were mapped with > persistence. > Conclusion: Whatever drives are mapped persisted when logged in as the > user the service logs in as, then your app can call "net use" and get > those drives returned from "net use" > even if your logged in as "dt-user" OR nobody is logged in at all > > Maybe someone can confirm my finding, but this is what I see. > > Thanks again > Pat > You are on a Windows 7 system, which supports one user logged in at a time. I would be interested in seeing how this behaves on a Windows Server 2008 R2 system, configured for multiple users to be logged on at the same time (the default for remote administration mode is one user at a time). I do believe this is an artifact of the Windows 7 architecture (one user at a time) because Windows Server 2008 R2 has different "security zones" (rings) in its kernel implementation for access by different components (services, drivers, and users) which affect the presentation to the user. Also, persistent mappings are user specific. So if usera has two persistent drive mappings and userb has three different persistent mappings, usera will see his two when he is logged on and userb will see his three when he is logged on. Do you have the same persistent mappings for dt-user and service-user? You have also stated that you see no mapped drives when you run the service, so it seems as though starting the service first (and never having anyone logged in or dt-user) is an exception. Therefore, by extension of what you said above, you only receive the mapped drives if 1) the service starts first and then the service account logs in interactively, or 2) the service starts after logging in with the service account. Did you try both of these? But once the service "sees" the mappings, it retains it until: the service restarts? Does it matter whether the service restarts with someone logged on (i.e., the service account) or no one logged in? I do not think that you have explored all of the conditions required for the service to maintain its mappings, and that may be fine for your application, but then again, it may not be. That is for you to decide. Jeffrey Harris This e-mail and any attachments are intended only for the use of the addressee(s) nam
Re: runtime.exec "cmd.exe /C net use"
On Mar 25, 2013, at 1:15 PM, Howard W. Smith, Jr. wrote: On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty wrote: Update: If I'm login interactively (meaning machine boots and I login and get my desktop) and that interactive account matches the service login account then "net use" from within the service does return all mapped drives. I expected as much. It seems as though you cannot get away from the requirement of having to login 'first'...to get everything working as designed/expected in your app. Excuse me, if I missed the business requirement specification (earlier in this conversation), but is the requirement only to get a list of mapped drives for 'your' user login or any enduser that logs into the production server/client/PC/machine? can you add the list of network drives to a database table, and maintain the database table and retrieve the list from that database table via the tomcat-app-running-as-service? if you only need a list of mapped network drives for your user login, can you just maintain a 'file' that has this list on the target/production server, and whenever it changes, can you update the file, and make the topcat-app-running-as-service to always read the file instead of having to call 'net use'? IMHO and FWIW, i would never go with the approach of relying on a windows 'command line' to do this/that for me. yes, in my app, i allow endusers to update files/documents, and the app saves the files/documents to a certain folder on the server, and my app will list those files on a web page, and they can view/download those files from/via the web app... all that is done via java instead of doing a 'cmd.exe dir'. i'm new to java, always wanted to be java developer, and loving what i can do with java. i'm almost getting to the point, where my days of a 'windows user' are done... one day, i hope to migrate to linux for target server instead of windows server. :) This is what I see. If my service logs in as "service-user" and I login normally to my desktop as "dt-user". I call "net use" from my service and get an empty list. Now I logout as "dt-user"and login as "service-user" and I mapped 4 drives and only 2 of the drives are mapped persisted (i.e. reconnect at logon). I logout as "service-user" and now I have my app call "net use" programatically and it returns the 2 drives that were mapped with persistence. Conclusion: Whatever drives are mapped persisted when logged in as the user the service logs in as, then your app can call "net use" and get those drives returned from "net use" even if your logged in as "dt-user" OR nobody is logged in at all Maybe someone can confirm my finding, but this is what I see. Thanks again Pat - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: IWA username using JSP for Already authenticated Window system
Cédric Couralet wrote: 2013/3/25 N.s.Karthik : Hi Hello https://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html I have already tried this and found the same to Work only on Windows Environment but my Tomcat servers are on Oracle Linux Systems... Will this configurations work with "Tomcat 7.0.30 on Linux" with Clients using IE8 from Windows ??? I will assume you talk about the SPNEGO Authenticator from tomcat. If that is the case, then I can confirm it works on Linux (Debian SID here). One thing to watch for is that the client must use Kerberos and not NTLM (it's a guess but it seems logical) . Sorry to burst in, but can you elaborate on that ? Why does it seem logical ? To my own (admittedly limited) knowledge, Kerberos is not the most widely implemented solution in Windows networks, NTLMv2 is. Does the SPNEGO implementation in Tomcat not work with NTLMv2 then ? For this, you must have AD knowing your tomcat server ie : nslookup your.url must return your IP adress . For the rest the documentation on the tomcat website is basically all I needed. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: IWA username using JSP for Already authenticated Window system
2013/3/25 N.s.Karthik : > Hi Hello >>>https://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html > > I have already tried this and found the same to Work only on Windows > Environment > > but my Tomcat servers are on Oracle Linux Systems... > > Will this configurations work with "Tomcat 7.0.30 on Linux" with Clients > using IE8 from Windows ??? > I will assume you talk about the SPNEGO Authenticator from tomcat. If that is the case, then I can confirm it works on Linux (Debian SID here). One thing to watch for is that the client must use Kerberos and not NTLM (it's a guess but it seems logical) . For this, you must have AD knowing your tomcat server ie : nslookup your.url must return your IP adress . For the rest the documentation on the tomcat website is basically all I needed. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Change Root app Tomcat 7
OK, I'll bite. Please note that a lot of this is using inferred information since you don't provide it in your mail message. Responses inline On 3/25/2013 9:39 AM, Jigi Sheth wrote: My current set up in Tomcat 7 is when I drop my Application.war to `\Tomcat7\webapps\` directory, it gets auto deployed `\Tomcat7\webapps\root\` directory. === Case is important - the directory must be ROOT, even on Windows. === To access my site in testing I use following http:\\mytestserver.mysitename\Login.html During testing I also noticed that if i do http:\\mysitename\ it gets me to my default page [default.html] === So you have a page called default.html and it's specified like this: default.html in your web.xml === I am trying to change the way this is currently set up to following The auto deploy of `Application.war` can still occur to `\Tomcat7\webapps\root\` directory. === No, the auto-deploy of the application (if you've named it Application.war) should create a \Tomcat7\webapps\Application directory - provided you've left the default server.xml unpackWARs="true" for your Host element alone. To access site, I would like to use following URL http:\\mytestserver.mysitename\Application.war\Login.html === Hopefully you mean: http://mytestserver.mysite/Application/Login.html Note the above: 1. Slashes are not Windows-based 2. Application - not Application.war Naming a file called Application.war.war (to generate an Application.war URL) will cause double deployment. At least it did on my quick test . . . === and anyone using the previously bookmarked address http:\\mytestserver.mysitename\Login.html get redirected to http:\\mytestserver.mysitename\Application.war\Login.html === And now we get to the heart of the problem . . . . === I have the following redirect in my `apache/conf/httpd.conf` JkMount /*.html ajp13 === Ah, so you have a front end Apache HTTPD server connected via AJP. This is nice to know. === and my worker.properties file has following host info worker.ajp13.host=http:\\mytestserver.mysitename === And you're trying to use mod_jk . . . The above two lines (the JkMount and the worker.ajp.host) are problematic at best. The first will almost certainly not get you what you want, and the second appears to be a mix of mod_proxy_http and mod_ajp. The second line will not work at all. If you're using mod_jk, one clean set of JkMounts is: JkMount /Application/ ajp13 JkMount /Application/* ajp13 I won't address your workers.properties file in this message. However, please read the following link: http://tomcat.apache.org/connectors-doc/reference/workers.html Also, download the source code for the connector, unpack it, and look in conf subdirectory. There are some very good examples on how to set up workers.properties, uriworkermap.properties, and httpd.conf (httpd-jk.conf). Finally, since you're using Apache HTTPD in front of your Apache Tomcat, you could use a Redirect directive in httpd.conf to accomplish your goal. Something like the following might work: RedirectMatch permanent /(.*) http://mytestserver.mysitename/Application/$1 Please note that the above line may be wrapped (it should be on one line). === Reference used: [How to set up sites in Tomcat7][1] [How_do_I_make_my_web_application_be_the_Tomcat_default_application][2] [1]:http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application_.3F > [2]:http://wiki.apache.org/tomcat> > /HowTo# > How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F . . . . just my two cents. /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: runtime.exec "cmd.exe /C net use"
On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty wrote: > Update: If I'm login interactively (meaning machine boots and I login and > get my desktop) and that interactive account matches the service login > account > then "net use" from within the service does return all mapped drives. > > I expected as much. It seems as though you cannot get away from the requirement of having to login 'first'...to get everything working as designed/expected in your app. Excuse me, if I missed the business requirement specification (earlier in this conversation), but is the requirement only to get a list of mapped drives for 'your' user login or any enduser that logs into the production server/client/PC/machine? can you add the list of network drives to a database table, and maintain the database table and retrieve the list from that database table via the tomcat-app-running-as-service? if you only need a list of mapped network drives for your user login, can you just maintain a 'file' that has this list on the target/production server, and whenever it changes, can you update the file, and make the topcat-app-running-as-service to always read the file instead of having to call 'net use'? IMHO and FWIW, i would never go with the approach of relying on a windows 'command line' to do this/that for me. yes, in my app, i allow endusers to update files/documents, and the app saves the files/documents to a certain folder on the server, and my app will list those files on a web page, and they can view/download those files from/via the web app... all that is done via java instead of doing a 'cmd.exe dir'. i'm new to java, always wanted to be java developer, and loving what i can do with java. i'm almost getting to the point, where my days of a 'windows user' are done... one day, i hope to migrate to linux for target server instead of windows server. :)
Re: [somewhat OT] runtime.exec "cmd.exe /C net use"
On Mon, Mar 25, 2013 at 5:50 AM, André Warnier wrote: > Howard W. Smith, Jr. wrote: > >> Hi Jeffrey, >>> >>> Yes, I now get it. Thanks for the lesson on Windows Networking (I thought >>> I knew well) and thanks to Andre as well. >>> You also said that if all I wanted to do was make a list of mapping >>> appear >>> in an html page (without actually using them >>> in your application), you can just fake it as previously discussed. I >>> think I missed that part. >>> >>> Thanks >>> Pat >>> >>> >>> >>> Glad you understand now. I was about to provide a response similar to >> Andre's previous response. This all reminds me of a similar situation >> within my TomEE/Tomcat7 web app. >> >> On my development server (Windows 2008 server 64-bit), I am 'always' >> logged >> in and coding/etc, which means I always test the web app via NetBeans >> (which provide the infamous 'console' that is mentioned throughout this >> thread). I developed this piece of code that uses JODConverter to call >> OpenOffice.org at/via port 2002, and this allows my web app to convert >> files to PDF after enduser uploads certain documents (Word docs, excel, >> etc...). So, that all works on my development server. Why? because I am >> logged in everytime while testing and the app is 'never' running as a >> Windows 'service' on my development server. >> >> So, i deploy my web app to target/production server (Windows 2003 Server >> and/or Windows Server 2008). For many months now, I have wondered 'why' >> the >> code will not work on the 'production' server but it runs/works >> 'everytime' >> on my development server. Finally, recently (after many months of research >> and/or multiple attempts of trying to debug/resolve the problem), I either >> read somewhere or finally realized that the code will 'not' work because >> my >> web app is running as a service, and for whatever reason (of course a >> 'Windows' reason), the code will 'not' work while running as a service. >> >> So, I am left to coding another implementation to convert files after >> upload, use another library, and ditch the JODConverter/OpenOffice.org >> approach. >> >> > Maybe of interest to you : I do use JODConverter+OpenOffice in the > circumstances which you describe (and for the same reason), within a perl > program running as a Windows Service, and it works fine. I don't think I > have ever precisely done that on a Windows 2008 Server, but I do have that > running on various other Windows platforms (Win2K, WinXP, Windows-7, > Windows 2003 server) since years, and have converted hundreds of thousands > of documents with it. > (A bit on the side : you may also want to have a look at LibreOffice, > which does away with the need of a JODConverter-like interface; but I do > not know (yet) how good it is at generating PDFs from MS-Office documents). > > If I can help, we can continue this discussion off-list if you want. > > Interesting indeed and thanks for the response. I knew (and was confident) that there was way to get it all working, that I was tried-and-tried for months (multiple attempts) to get it working, and still, i have 'not' ultimately removed it from the app...lol. I've added many things to the app and endusers are not using all the nice bells and whistles that I have added. they pretty much use what they really need to complete day-to-day operations. sometimes, i add things to the app that I know would be useful (for power users...like myself). > > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@tomcat.**apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: runtime.exec "cmd.exe /C net use"
On Mon, Mar 25, 2013 at 6:03 AM, André Warnier wrote: > Howard W. Smith, Jr. wrote: > >> On Sun, Mar 24, 2013 at 7:14 PM, Howard W. Smith, Jr. < >> smithh032...@gmail.com> wrote: >> >> >>> Hi Jeffrey, Yes, I now get it. Thanks for the lesson on Windows Networking (I thought I knew well) and thanks to Andre as well. You also said that if all I wanted to do was make a list of mapping appear in an html page (without actually using them in your application), you can just fake it as previously discussed. I think I missed that part. Thanks Pat Glad you understand now. I was about to provide a response similar to >>> Andre's previous response. This all reminds me of a similar situation >>> within my TomEE/Tomcat7 web app. >>> >>> On my development server (Windows 2008 server 64-bit), I am 'always' >>> logged in and coding/etc, which means I always test the web app via >>> NetBeans (which provide the infamous 'console' that is mentioned >>> throughout >>> this thread). I developed this piece of code that uses JODConverter to >>> call >>> OpenOffice.org at/via port 2002, and this allows my web app to convert >>> files to PDF after enduser uploads certain documents (Word docs, excel, >>> etc...). So, that all works on my development server. Why? because I am >>> logged in everytime while testing and the app is 'never' running as a >>> Windows 'service' on my development server. >>> >>> So, i deploy my web app to target/production server (Windows 2003 Server >>> and/or Windows Server 2008). For many months now, I have wondered 'why' >>> the >>> code will not work on the 'production' server but it runs/works >>> 'everytime' >>> on my development server. Finally, recently (after many months of >>> research >>> and/or multiple attempts of trying to debug/resolve the problem), I >>> either >>> read somewhere or finally realized that the code will 'not' work because >>> my >>> web app is running as a service, and for whatever reason (of course a >>> 'Windows' reason), the code will 'not' work while running as a service. >>> >>> So, I am left to coding another implementation to convert files after >>> upload, use another library, and ditch the JODConverter/OpenOffice.org >>> approach. >>> >>> >>> Forgot to mention... since OpenOffice.org can be installed in the >> Startup >> folder, i was assuming that it would run as a service on production >> server, >> and/but I forgot that Startup folder just automatically starts the app >> immediately when/after you login. OpenOffice.org is 'not' running as a >> service, and since my web app is running as a service (in a different >> 'environment'), my web app was unable to access OpenOffice.org, because >> clearly/definitely/evidently, it was not/never running as a 'service'.. >> which means it was never available to my web app. :( >> >> > And, to get back more OT, that may be the fundamental difference with my > succesful usage of the same : in my case, it is my service program which > launches the background OpenOffice instance, which most probably means that > it too is running in the same service context a the main service program. > (Which brings us back to the same context as this thread). > > +1 I have realized that this seems to be necessary (if want a tomcat-app-running-as-service able to access some other Windows app-or-command-line-executable, then Windows app must be running as service, first-and-foremost). I may give this a go, or try it out, ASAP. thanks! > > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@tomcat.**apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Change Root app Tomcat 7
My current set up in Tomcat 7 is when I drop my Application.war to `\Tomcat7\webapps\` directory, it gets auto deployed `\Tomcat7\webapps\root\` directory. To access my site in testing I use following http:\\mytestserver.mysitename\Login.html During testing I also noticed that if i do http:\\mysitename\ it gets me to my default page [default.html] I am trying to change the way this is currently set up to following The auto deploy of `Application.war` can still occur to `\Tomcat7\webapps\root\` directory. To access site, I would like to use following URL http:\\mytestserver.mysitename\Application.war\Login.html and anyone using the previously bookmarked address http:\\mytestserver.mysitename\Login.html get redirected to http:\\mytestserver.mysitename\Application.war\Login.html I have the following redirect in my `apache/conf/httpd.conf` JkMount /*.html ajp13 and my worker.properties file has following host info worker.ajp13.host=http:\\mytestserver.mysitename Reference used: [How to set up sites in Tomcat7][1] [How_do_I_make_my_web_application_be_the_Tomcat_default_application][2] [1]: http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application_.3F [2]: http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F
Re: runtime.exec "cmd.exe /C net use"
On Mar 25, 2013, at 11:59 AM, Harris, Jeffrey E. wrote: -Original Message- Update: If I'm login interactively (meaning machine boots and I login and get my desktop) and that interactive account matches the service login account then "net use" from within the service does return all mapped drives. I'm not sure if that is by design or is something I can hang my hat on but it is the case with Windows 7 SP1. Thanks again Pat Interesting. It is possible that if you are already logged in, and start the service, it does not need to log in separately as the service. Does this work whether you start the service before or after you log in interactively with the same account? I just tested this and the order does not matter. Works for both sequences. In any case, I am not sure you can rely on that because it does require an interactive login, and if your system reboots in the middle of the night (whether because of an unplanned event or installation of Microsoft updates, depending on your server is configured), you will not be there to log in interactively so the net share list is available, and you probably do not want to set automatic login for the account. We only use it to populate a UI where you select a path that gets stored in a DB. Path is used as destination for scheduled backups. So for us it will not present a problem. Jeffrey Harris This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: runtime.exec "cmd.exe /C net use"
> -Original Message- > Update: If I'm login interactively (meaning machine boots and I login > and get my desktop) and that interactive account matches the service > login account then "net use" from within the service does return all > mapped drives. > I'm not sure if that is by design or is something I can hang my hat on > but it is the case with Windows 7 SP1. > > Thanks again > Pat > > > Interesting. It is possible that if you are already logged in, and start the service, it does not need to log in separately as the service. Does this work whether you start the service before or after you log in interactively with the same account? In any case, I am not sure you can rely on that because it does require an interactive login, and if your system reboots in the middle of the night (whether because of an unplanned event or installation of Microsoft updates, depending on your server is configured), you will not be there to log in interactively so the net share list is available, and you probably do not want to set automatic login for the account. Jeffrey Harris This e-mail and any attachments are intended only for the use of the addressee(s) named herein and may contain proprietary information. If you are not the intended recipient of this e-mail or believe that you received this email in error, please take immediate action to notify the sender of the apparent error by reply e-mail; permanently delete the e-mail and any attachments from your computer; and do not disseminate, distribute, use, or copy this message and any attachments. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can ClientAbortException be circumvented?
On Mon, Mar 25, 2013 at 11:54 AM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: > On Mon, Mar 25, 2013 at 9:00 AM, Thad Humphries > wrote: > >> On Sun, Mar 24, 2013 at 4:46 PM, Konstantin Kolinko >> wrote: >> >> > 2013/3/25 Thad Humphries : >> > > I have a web-app that uses a servlet for downloading files from a >> > > repository--PDF, Office, images, zip, etc. It works with desktop >> > > browsers--IE, Firefox, Chrome, and Safari--on their various >> platforms. It >> > > also works fine with Firefox from Android (2.3 and 4.x tested). >> However >> > > when I try with Android's default WebKit browser, the servlet fails >> > > immediately with org.apache.catalina.connector.ClientAbortException >> (so >> > > says the stderr log). >> > >> > 1. Is this issue specific to some kind of files, or it occurs with all >> of >> > them? >> > >> >> All of them--PDF, XLS, DOC, DOCX, TIFF, ZIP, etc. Every file type I've >> tried. >> > > Hmmm, interesting thread (and responses so far). I think I am aware of > this 'Android default Webkit browser' you are referring to. I always avoid > using it, and download Google Chrome from Google Play store to my Android > devices, and I don't think I ever tested my web app with the default > browser installed on Android devices. > > I have downloaded PDF files (generated in-memory) from my java/JSF web app > to Android device, and I have never seen this ClientAbortException. my web > app also has at least one iPad enduser (which has Google Chrome installed > on iPad). I am unaware of his experience and I don't think he downloads PDF > files from web app to his iPad, but I am quite confident that it works or > will work. :) > > > > >> > > > I suspect this is a problem with mobile WebKit, and that circumventing >> > the >> > > abort might be a "bad thing" even if it's possible. However I thought >> I'd >> > > inquire here if there is a Tomcat way around it. If not, it seems my >> > > alternatives are (1) use Java Mail to mail the user the file, since >> mail >> > > apps open their attachments; and (2) write iOS and Android apps file >> > query >> > > and downloading. Neither prospect thrills me. >> > > Okay, i just tested this with/in my web app on my Google Nexus 7 (android, > of course). I offer Download, Print, and View hyperlinks within the web > app. Mind you, this is PrimeFaces xhtml below. > > ---download--- > > actionListener="#{pf_ordersController.refreshContractsToDownload()}"> > > > > Test and results: > > clicked Download button, PDF downloaded to Google Nexus 7 (Google Chrome > browser, of course), showed up in notifications, instead of PDF Viewer app, > I selected to open the PDF document in Adobe Acrobat (app that was > downloaded from Google Play). > > ---view--- > > actionListener="#{pf_ordersController.refreshContractsToDownload()}"> > contentDisposition="inline"/> > > > Test and results: > > clicked View button, I saw another web page tab open rather quickly in the > Google Chrome browser on Google Nexus 7, and then the new tab closed > immediately, and then I saw the 'Starting download' toast (at bottom of > Google Nexus 7), but I didn't see the file in notifications or downloads, > and I didn't see any exceptions in my TomEE/tomcat7 logs. > > With that said, maybe I just duplicated this issue/exception that you have > been experiencing. If I'm not mistaking, PrimeFaces is using the servlet > solution for file downloads. > > So, based on this test of mine, it is best to offer a 'download' hyperlink > 'only' on mobile devices as I am already detecting mobile devices when they > login to the web app. > > Thanks for this topic. now I know what i 'need' to do. :) > > Forgot to mention; i would definitely provide an option for files to be emailed to endusers. my web app has that option as well as it is more reliable. i have found that endusers do a lot of multi-tasking on mobile devices, and mobile browsers seem to lose connection when they go to some other app. i may not be describing this correctly, but I have noticed this behavior, myself.
Re: Can ClientAbortException be circumvented?
On Mon, Mar 25, 2013 at 9:00 AM, Thad Humphries wrote: > On Sun, Mar 24, 2013 at 4:46 PM, Konstantin Kolinko > wrote: > > > 2013/3/25 Thad Humphries : > > > I have a web-app that uses a servlet for downloading files from a > > > repository--PDF, Office, images, zip, etc. It works with desktop > > > browsers--IE, Firefox, Chrome, and Safari--on their various platforms. > It > > > also works fine with Firefox from Android (2.3 and 4.x tested). However > > > when I try with Android's default WebKit browser, the servlet fails > > > immediately with org.apache.catalina.connector.ClientAbortException (so > > > says the stderr log). > > > > 1. Is this issue specific to some kind of files, or it occurs with all of > > them? > > > > All of them--PDF, XLS, DOC, DOCX, TIFF, ZIP, etc. Every file type I've > tried. > Hmmm, interesting thread (and responses so far). I think I am aware of this 'Android default Webkit browser' you are referring to. I always avoid using it, and download Google Chrome from Google Play store to my Android devices, and I don't think I ever tested my web app with the default browser installed on Android devices. I have downloaded PDF files (generated in-memory) from my java/JSF web app to Android device, and I have never seen this ClientAbortException. my web app also has at least one iPad enduser (which has Google Chrome installed on iPad). I am unaware of his experience and I don't think he downloads PDF files from web app to his iPad, but I am quite confident that it works or will work. :) > > > > > I suspect this is a problem with mobile WebKit, and that circumventing > > the > > > abort might be a "bad thing" even if it's possible. However I thought > I'd > > > inquire here if there is a Tomcat way around it. If not, it seems my > > > alternatives are (1) use Java Mail to mail the user the file, since > mail > > > apps open their attachments; and (2) write iOS and Android apps file > > query > > > and downloading. Neither prospect thrills me. > Okay, i just tested this with/in my web app on my Google Nexus 7 (android, of course). I offer Download, Print, and View hyperlinks within the web app. Mind you, this is PrimeFaces xhtml below. ---download--- Test and results: clicked Download button, PDF downloaded to Google Nexus 7 (Google Chrome browser, of course), showed up in notifications, instead of PDF Viewer app, I selected to open the PDF document in Adobe Acrobat (app that was downloaded from Google Play). ---view--- Test and results: clicked View button, I saw another web page tab open rather quickly in the Google Chrome browser on Google Nexus 7, and then the new tab closed immediately, and then I saw the 'Starting download' toast (at bottom of Google Nexus 7), but I didn't see the file in notifications or downloads, and I didn't see any exceptions in my TomEE/tomcat7 logs. With that said, maybe I just duplicated this issue/exception that you have been experiencing. If I'm not mistaking, PrimeFaces is using the servlet solution for file downloads. So, based on this test of mine, it is best to offer a 'download' hyperlink 'only' on mobile devices as I am already detecting mobile devices when they login to the web app. Thanks for this topic. now I know what i 'need' to do. :)
Re: runtime.exec "cmd.exe /C net use"
On Mar 25, 2013, at 6:03 AM, André Warnier wrote: Howard W. Smith, Jr. wrote: On Sun, Mar 24, 2013 at 7:14 PM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: Hi Jeffrey, Yes, I now get it. Thanks for the lesson on Windows Networking (I thought I knew well) and thanks to Andre as well. You also said that if all I wanted to do was make a list of mapping appear in an html page (without actually using them in your application), you can just fake it as previously discussed. I think I missed that part. Thanks Pat Glad you understand now. I was about to provide a response similar to Andre's previous response. This all reminds me of a similar situation within my TomEE/Tomcat7 web app. On my development server (Windows 2008 server 64-bit), I am 'always' logged in and coding/etc, which means I always test the web app via NetBeans (which provide the infamous 'console' that is mentioned throughout this thread). I developed this piece of code that uses JODConverter to call OpenOffice.org at/via port 2002, and this allows my web app to convert files to PDF after enduser uploads certain documents (Word docs, excel, etc...). So, that all works on my development server. Why? because I am logged in everytime while testing and the app is 'never' running as a Windows 'service' on my development server. So, i deploy my web app to target/production server (Windows 2003 Server and/or Windows Server 2008). For many months now, I have wondered 'why' the code will not work on the 'production' server but it runs/works 'everytime' on my development server. Finally, recently (after many months of research and/or multiple attempts of trying to debug/resolve the problem), I either read somewhere or finally realized that the code will 'not' work because my web app is running as a service, and for whatever reason (of course a 'Windows' reason), the code will 'not' work while running as a service. So, I am left to coding another implementation to convert files after upload, use another library, and ditch the JODConverter/ OpenOffice.org approach. Forgot to mention... since OpenOffice.org can be installed in the Startup folder, i was assuming that it would run as a service on production server, and/but I forgot that Startup folder just automatically starts the app immediately when/after you login. OpenOffice.org is 'not' running as a service, and since my web app is running as a service (in a different 'environment'), my web app was unable to access OpenOffice.org, because clearly/definitely/evidently, it was not/never running as a 'service'.. which means it was never available to my web app. :( And, to get back more OT, that may be the fundamental difference with my succesful usage of the same : in my case, it is my service program which launches the background OpenOffice instance, which most probably means that it too is running in the same service context a the main service program. (Which brings us back to the same context as this thread). Update: If I'm login interactively (meaning machine boots and I login and get my desktop) and that interactive account matches the service login account then "net use" from within the service does return all mapped drives. I'm not sure if that is by design or is something I can hang my hat on but it is the case with Windows 7 SP1. Thanks again Pat - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: IWA username using JSP for Already authenticated Window system
On Mar 25, 2013, at 10:47 AM, N.s.Karthik wrote: > Hi > > Thx for the Quick Reply > >>> https://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html > > I have already tried this and found the same to Work only on Windows > Environment Tried what specifically? There are several suggestions for making this work at the above link. > > but my Tomcat servers are on Oracle Linux Systems... > > Will this configurations work with "Tomcat 7.0.30 on Linux" with Clients > using IE8 from Windows ??? Again, you are going to need to be more specific on what configuration you are referring to. Dan > > > with regards > Karthik > > > > > -- > View this message in context: > http://tomcat.10.n6.nabble.com/IWA-username-using-JSP-for-Already-authenticated-Window-system-tp4996846p4996896.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: IWA username using JSP for Already authenticated Window system
Hi Thx for the Quick Reply >>https://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html I have already tried this and found the same to Work only on Windows Environment but my Tomcat servers are on Oracle Linux Systems... Will this configurations work with "Tomcat 7.0.30 on Linux" with Clients using IE8 from Windows ??? with regards Karthik -- View this message in context: http://tomcat.10.n6.nabble.com/IWA-username-using-JSP-for-Already-authenticated-Window-system-tp4996846p4996896.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can ClientAbortException be circumvented?
On Mon, Mar 25, 2013 at 10:02 AM, Brett Delle Grazie < brett.dellegra...@gmail.com> wrote: > On 25 March 2013 13:00, Thad Humphries wrote: > > > On Sun, Mar 24, 2013 at 4:46 PM, Konstantin Kolinko > > wrote: > > > > > 2013/3/25 Thad Humphries : > > > > I have a web-app that uses a servlet for downloading files from a > > > > repository--PDF, Office, images, zip, etc. It works with desktop > > > > browsers--IE, Firefox, Chrome, and Safari--on their various > platforms. > > It > > > > also works fine with Firefox from Android (2.3 and 4.x tested). > However > > > > when I try with Android's default WebKit browser, the servlet fails > > > > immediately with org.apache.catalina.connector.ClientAbortException > (so > > > > says the stderr log). > > > > > > 1. Is this issue specific to some kind of files, or it occurs with all > of > > > them? > > > > > > > All of them--PDF, XLS, DOC, DOCX, TIFF, ZIP, etc. Every file type I've > > tried. > > > > > > > 2. If client aborts a connection, there is nothing much a server can > > > do. It is issue in your web browser. > > > > > > > Yeah, I suspected that. > > > > > > > > The servlet is sending proper headers, including the correct MIME > type, > > > > Content-Disposition attachment, file size, etc. I even took to adding > > the > > > > file's name as the last GET parameter. No dice. > > > > > > 3. Maybe the browser does not like "Content-Disposition attachment"? > > > Maybe it cannot save the file? > > > > > > > These same file types can be downloaded if the servlet is called by > > Firefox, or if the file is requested from a directory listing or in an > > email attachment. In these cases, with Android they go to the Downloads > > directory on the memory card; on iPad, DOCs open in Pages, PDFs in a > > viewer, etc. > > > > > > > 4. Does it depend on file size? How the file is served? (What > > > connector implementation are you using? Do you use compression, do you > > > use sendfile?) > > > > > > > Size does not matter, a few K or a several hundred K. > > > > > Safari on iPad, iPhone, and iPod Touch also fail. Although I don't have > > > one > > > > with me at this moment to test, I suspect their failure is also > caused > > > by a > > > > ClientAbortException: Safari is also WebKit and *I've Google'd > numerous > > > > complaints about this exception when using mobile WebKit browsers*. > > > While I > > > > can tell Android users to try Firefox, there is no Firefox for > iPhone. > > > > > > > > I'm expecting a file to open in a local viewer app, like Acrobat > > Reader, > > > > QuickOffice, Pages, etc. I can open files in these apps via Firefox, > an > > > > email client, or via the WebKit browser when viewing a directory > > listing > > > in > > > > my public_html directories and similar locations. > > > > > > > > I suspect this is a problem with mobile WebKit, and that > circumventing > > > the > > > > abort might be a "bad thing" even if it's possible. However I thought > > I'd > > > > inquire here if there is a Tomcat way around it. If not, it seems my > > > > alternatives are (1) use Java Mail to mail the user the file, since > > mail > > > > apps open their attachments; and (2) write iOS and Android apps file > > > query > > > > and downloading. Neither prospect thrills me. > > > > Is this over HTTPS or standard HTTP? Standard HTTP. The servlet opens the file from the repository using the repository's API, sends the HTTP header, then reads the file (again with the API) and sends the bytes to ServletOutputStream. The file is read and written in blocks of response.getBufferSize() or 8K if that call returns zero. -- "Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be" --Christopher Marlowe, *Doctor Faustus* (v, 121-24)
Re: Can ClientAbortException be circumvented?
On 25 March 2013 13:00, Thad Humphries wrote: > On Sun, Mar 24, 2013 at 4:46 PM, Konstantin Kolinko > wrote: > > > 2013/3/25 Thad Humphries : > > > I have a web-app that uses a servlet for downloading files from a > > > repository--PDF, Office, images, zip, etc. It works with desktop > > > browsers--IE, Firefox, Chrome, and Safari--on their various platforms. > It > > > also works fine with Firefox from Android (2.3 and 4.x tested). However > > > when I try with Android's default WebKit browser, the servlet fails > > > immediately with org.apache.catalina.connector.ClientAbortException (so > > > says the stderr log). > > > > 1. Is this issue specific to some kind of files, or it occurs with all of > > them? > > > > All of them--PDF, XLS, DOC, DOCX, TIFF, ZIP, etc. Every file type I've > tried. > > > > 2. If client aborts a connection, there is nothing much a server can > > do. It is issue in your web browser. > > > > Yeah, I suspected that. > > > > > The servlet is sending proper headers, including the correct MIME type, > > > Content-Disposition attachment, file size, etc. I even took to adding > the > > > file's name as the last GET parameter. No dice. > > > > 3. Maybe the browser does not like "Content-Disposition attachment"? > > Maybe it cannot save the file? > > > > These same file types can be downloaded if the servlet is called by > Firefox, or if the file is requested from a directory listing or in an > email attachment. In these cases, with Android they go to the Downloads > directory on the memory card; on iPad, DOCs open in Pages, PDFs in a > viewer, etc. > > > > 4. Does it depend on file size? How the file is served? (What > > connector implementation are you using? Do you use compression, do you > > use sendfile?) > > > > Size does not matter, a few K or a several hundred K. > > > Safari on iPad, iPhone, and iPod Touch also fail. Although I don't have > > one > > > with me at this moment to test, I suspect their failure is also caused > > by a > > > ClientAbortException: Safari is also WebKit and *I've Google'd numerous > > > complaints about this exception when using mobile WebKit browsers*. > > While I > > > can tell Android users to try Firefox, there is no Firefox for iPhone. > > > > > > I'm expecting a file to open in a local viewer app, like Acrobat > Reader, > > > QuickOffice, Pages, etc. I can open files in these apps via Firefox, an > > > email client, or via the WebKit browser when viewing a directory > listing > > in > > > my public_html directories and similar locations. > > > > > > I suspect this is a problem with mobile WebKit, and that circumventing > > the > > > abort might be a "bad thing" even if it's possible. However I thought > I'd > > > inquire here if there is a Tomcat way around it. If not, it seems my > > > alternatives are (1) use Java Mail to mail the user the file, since > mail > > > apps open their attachments; and (2) write iOS and Android apps file > > query > > > and downloading. Neither prospect thrills me. > Is this over HTTPS or standard HTTP? > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > -- > "Hell hath no limits, nor is circumscrib'd In one self-place; but where we > are is hell, And where hell is, there must we ever be" --Christopher > Marlowe, *Doctor Faustus* (v, 121-24) > -- Best Regards, Brett Delle Grazie
Re: Can ClientAbortException be circumvented?
On Sun, Mar 24, 2013 at 4:46 PM, Konstantin Kolinko wrote: > 2013/3/25 Thad Humphries : > > I have a web-app that uses a servlet for downloading files from a > > repository--PDF, Office, images, zip, etc. It works with desktop > > browsers--IE, Firefox, Chrome, and Safari--on their various platforms. It > > also works fine with Firefox from Android (2.3 and 4.x tested). However > > when I try with Android's default WebKit browser, the servlet fails > > immediately with org.apache.catalina.connector.ClientAbortException (so > > says the stderr log). > > 1. Is this issue specific to some kind of files, or it occurs with all of > them? > All of them--PDF, XLS, DOC, DOCX, TIFF, ZIP, etc. Every file type I've tried. > 2. If client aborts a connection, there is nothing much a server can > do. It is issue in your web browser. > Yeah, I suspected that. > > The servlet is sending proper headers, including the correct MIME type, > > Content-Disposition attachment, file size, etc. I even took to adding the > > file's name as the last GET parameter. No dice. > > 3. Maybe the browser does not like "Content-Disposition attachment"? > Maybe it cannot save the file? > These same file types can be downloaded if the servlet is called by Firefox, or if the file is requested from a directory listing or in an email attachment. In these cases, with Android they go to the Downloads directory on the memory card; on iPad, DOCs open in Pages, PDFs in a viewer, etc. > 4. Does it depend on file size? How the file is served? (What > connector implementation are you using? Do you use compression, do you > use sendfile?) > Size does not matter, a few K or a several hundred K. > Safari on iPad, iPhone, and iPod Touch also fail. Although I don't have > one > > with me at this moment to test, I suspect their failure is also caused > by a > > ClientAbortException: Safari is also WebKit and *I've Google'd numerous > > complaints about this exception when using mobile WebKit browsers*. > While I > > can tell Android users to try Firefox, there is no Firefox for iPhone. > > > > I'm expecting a file to open in a local viewer app, like Acrobat Reader, > > QuickOffice, Pages, etc. I can open files in these apps via Firefox, an > > email client, or via the WebKit browser when viewing a directory listing > in > > my public_html directories and similar locations. > > > > I suspect this is a problem with mobile WebKit, and that circumventing > the > > abort might be a "bad thing" even if it's possible. However I thought I'd > > inquire here if there is a Tomcat way around it. If not, it seems my > > alternatives are (1) use Java Mail to mail the user the file, since mail > > apps open their attachments; and (2) write iOS and Android apps file > query > > and downloading. Neither prospect thrills me. > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- "Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be" --Christopher Marlowe, *Doctor Faustus* (v, 121-24)
Re: IWA username using JSP for Already authenticated Window system
On Mar 24, 2013, at 11:30 PM, N.s.Karthik wrote: > Hi > > spec : O/s Linux -Oracle >Jdk =1.6 >Tomcat = 7.0.30 >Browsers = IE8 Only > > * Pre authenticated Windows Clients via Active directory * > Would use Integrated Window Authentication settings for Browsers > > > > Question : Since All the Systems are pre authenticated in Window domain via > Active Directory during bootup process, and On request of a URL of web > application ( Tomcat7 served from linux) need to pass the username of the > system ? Have you read... https://tomcat.apache.org/tomcat-7.0-doc/windows-auth-howto.html Dan > > Can some body help me for the solutions . > > with regards karthik > > > > > -- > View this message in context: > http://tomcat.10.n6.nabble.com/IWA-username-using-JSP-for-Already-authenticated-Window-system-tp4996846.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to set environment variables for R to use in Tomcat on RedHat Linux (RHEL6)
On Mar 24, 2013, at 3:56 AM, Patrick Hong wrote: > I'm trying to set up R and Tomcat on RHEL6 (6.4) > > I have installed R and can run it. I have installed Tomcat 7 and can host > files file. I have packaged an application as a WAR file and deployed it > using tomcat. The application runs fine in all aspects until it uses any R > component. > > This is where it crashes out with the following error as seen in > catalina.out: > > > Cannot find JRI native library! > Please make sure that the JRI native library is in a directory listed in > java.library.path. I prefer setting "java.library.path" to setting "LD_LIBRARY_PATH", as the first is system independent. They should both work though. > > java.lang.UnsatisfiedLinkError: > /usr/local/lib64/R-2.15.3/library/rJava/jri/libj > ri.so: libR.so: cannot open shared object file: Too many levels of symbolic > links This error "Too many levels of symbolic links" usually happens when there is a problem with your symbolic links. For example, you have a link to a link which links to another link, etc… or when you have circular links. A couple things you can do to debug further. 1.) Manually follow the symbolic links for "libR.so" (what it appears to be trying to load) using "ls". 2.) Use the "ldd" command ex: "ldd libR.so". Make sure ldd is able to locate all the required libraries. > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675) > at java.lang.Runtime.loadLibrary0(Runtime.java:840) > at java.lang.System.loadLibrary(System.java:1047) > at org.rosuda.JRI.Rengine.(Rengine.java:19) > > > I do have rJava installed under R: install.packages("rJava") It installed > fine and I have rJava inside the R's library folder. > > I have defined the following in /etc/profile: > > > export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre > export R_HOME=/usr/local/lib64/R-2.15.3 > PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$R_HOME/bin > export PATH > export > LD_LIBRARY_PATH=$R_HOME/lib/libR.so,$JAVA_HOME/lib/amd64/server/libjvm.so This looks wrong. 1.) Items specified by LD_LIBRARY_PATH should point to directories not shared libraries. Try using "$R_HOME/lib". "In Linux, the environment variable LD_LIBRARY_PATH is a colon-separated set of directories where libraries should be searched for first, before the standard set of directories;" http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html 2.) Why are you including the path to "libjvm.so"? This is not something you would normally do. > > > To my understanding, that should set JAVA_HOME, R_HOME, PATH, and > LD_LIBRARY_PATH globally for all users on the server. I know Tomcat runs > under root and I can confirm that root was able to see all the above paths Running Tomcat as root is a *really* bad idea. You should create a dedicated user with minimal permissions to run Tomcat. This will limit the scope of what an attacker could accomplish should he or she be able to compromise your system. Dan > as set above via "echo $JAVA_HOME", "echo $R_HOME", "echo $LD_LIBRARY_PATH", > "echo $PATH" > > So I'm not sure why it's complaining that it can't open those .so files. > > Also, when it crashes out, it shuts down Tomcat. > > Thanks! > > Patrick > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: runtime.exec "cmd.exe /C net use"
Howard W. Smith, Jr. wrote: On Sun, Mar 24, 2013 at 7:14 PM, Howard W. Smith, Jr. < smithh032...@gmail.com> wrote: Hi Jeffrey, Yes, I now get it. Thanks for the lesson on Windows Networking (I thought I knew well) and thanks to Andre as well. You also said that if all I wanted to do was make a list of mapping appear in an html page (without actually using them in your application), you can just fake it as previously discussed. I think I missed that part. Thanks Pat Glad you understand now. I was about to provide a response similar to Andre's previous response. This all reminds me of a similar situation within my TomEE/Tomcat7 web app. On my development server (Windows 2008 server 64-bit), I am 'always' logged in and coding/etc, which means I always test the web app via NetBeans (which provide the infamous 'console' that is mentioned throughout this thread). I developed this piece of code that uses JODConverter to call OpenOffice.org at/via port 2002, and this allows my web app to convert files to PDF after enduser uploads certain documents (Word docs, excel, etc...). So, that all works on my development server. Why? because I am logged in everytime while testing and the app is 'never' running as a Windows 'service' on my development server. So, i deploy my web app to target/production server (Windows 2003 Server and/or Windows Server 2008). For many months now, I have wondered 'why' the code will not work on the 'production' server but it runs/works 'everytime' on my development server. Finally, recently (after many months of research and/or multiple attempts of trying to debug/resolve the problem), I either read somewhere or finally realized that the code will 'not' work because my web app is running as a service, and for whatever reason (of course a 'Windows' reason), the code will 'not' work while running as a service. So, I am left to coding another implementation to convert files after upload, use another library, and ditch the JODConverter/OpenOffice.org approach. Forgot to mention... since OpenOffice.org can be installed in the Startup folder, i was assuming that it would run as a service on production server, and/but I forgot that Startup folder just automatically starts the app immediately when/after you login. OpenOffice.org is 'not' running as a service, and since my web app is running as a service (in a different 'environment'), my web app was unable to access OpenOffice.org, because clearly/definitely/evidently, it was not/never running as a 'service'.. which means it was never available to my web app. :( And, to get back more OT, that may be the fundamental difference with my succesful usage of the same : in my case, it is my service program which launches the background OpenOffice instance, which most probably means that it too is running in the same service context a the main service program. (Which brings us back to the same context as this thread). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [somewhat OT] runtime.exec "cmd.exe /C net use"
Howard W. Smith, Jr. wrote: Hi Jeffrey, Yes, I now get it. Thanks for the lesson on Windows Networking (I thought I knew well) and thanks to Andre as well. You also said that if all I wanted to do was make a list of mapping appear in an html page (without actually using them in your application), you can just fake it as previously discussed. I think I missed that part. Thanks Pat Glad you understand now. I was about to provide a response similar to Andre's previous response. This all reminds me of a similar situation within my TomEE/Tomcat7 web app. On my development server (Windows 2008 server 64-bit), I am 'always' logged in and coding/etc, which means I always test the web app via NetBeans (which provide the infamous 'console' that is mentioned throughout this thread). I developed this piece of code that uses JODConverter to call OpenOffice.org at/via port 2002, and this allows my web app to convert files to PDF after enduser uploads certain documents (Word docs, excel, etc...). So, that all works on my development server. Why? because I am logged in everytime while testing and the app is 'never' running as a Windows 'service' on my development server. So, i deploy my web app to target/production server (Windows 2003 Server and/or Windows Server 2008). For many months now, I have wondered 'why' the code will not work on the 'production' server but it runs/works 'everytime' on my development server. Finally, recently (after many months of research and/or multiple attempts of trying to debug/resolve the problem), I either read somewhere or finally realized that the code will 'not' work because my web app is running as a service, and for whatever reason (of course a 'Windows' reason), the code will 'not' work while running as a service. So, I am left to coding another implementation to convert files after upload, use another library, and ditch the JODConverter/OpenOffice.org approach. Maybe of interest to you : I do use JODConverter+OpenOffice in the circumstances which you describe (and for the same reason), within a perl program running as a Windows Service, and it works fine. I don't think I have ever precisely done that on a Windows 2008 Server, but I do have that running on various other Windows platforms (Win2K, WinXP, Windows-7, Windows 2003 server) since years, and have converted hundreds of thousands of documents with it. (A bit on the side : you may also want to have a look at LibreOffice, which does away with the need of a JODConverter-like interface; but I do not know (yet) how good it is at generating PDFs from MS-Office documents). If I can help, we can continue this discussion off-list if you want. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org