Java Mailing List Archive

http://www.junlu.com/

Home » users-digest.tomcat »

users Digest 26 Mar 2013 02:10:37 -0000 Issue 11315

users-digest-help

2013-03-25


Author LoginPost Reply

users Digest 26 Mar 2013 02:10:37 -0000 Issue 11315

Topics (messages 240724 through 240736)

Re: runtime.exec "cmd.exe /C net use"
 240724 by: Patrick Flaherty
 240726 by: Howard W. Smith, Jr.
 240728 by: Howard W. Smith, Jr.
 240732 by: Patrick Flaherty
 240733 by: Harris, Jeffrey E.
 240734 by: Patrick Flaherty
 240736 by: Howard W. Smith, Jr.

Change Root app Tomcat 7
 240725 by: Jigi Sheth
 240729 by: Mark Eggers

Re: [somewhat OT] runtime.exec "cmd.exe /C net use"
 240727 by: Howard W. Smith, Jr.

Re: IWA username using JSP for Already authenticated Window system
 240730 by: Cédric Couralet
 240731 by: André Warnier

Tomcat Native
 240735 by: Amit A

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: users@(protected)
To unsubscribe, e-mail: users-digest-unsubscribe@(protected)
For additional commands, e-mail: users-digest-help@(protected)

----------------------------------------------------------------------


Attachment: users_240724.eml (zipped)

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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>



Attachment: users_240726.eml (zipped)
On Mon, Mar 25, 2013 at 6:03 AM, André Warnier <aw@(protected):

> Howard W. Smith, Jr. wrote:
>
>> On Sun, Mar 24, 2013 at 7:14 PM, Howard W. Smith, Jr. <
>> smithh032772@(protected):
>>
>>
>>> 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<users-unsubscribe@(protected)>
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment: users_240728.eml (zipped)
On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty
<pflahrty@(protected):

> 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. :)

Attachment: users_240732.eml (zipped)

On Mar 25, 2013, at 1:15 PM, Howard W. Smith, Jr. wrote:

> On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty
> <pflahrty@(protected):
>
>> 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







Attachment: users_240733.eml (zipped)


> -----Original Message-----
> From: Patrick Flaherty [mailto:pflahrty@(protected)]
> 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
> > <pflahrty@(protected):
> >
> >> 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) 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.


Attachment: users_240734.eml (zipped)

On Mar 25, 2013, at 7:13 PM, Harris, Jeffrey E. wrote:

>
>
>> -----Original Message-----
>> From: Patrick Flaherty [mailto:pflahrty@(protected)]
>> 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
>>> <pflahrty@(protected):
>>>
>>>> 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 persistently using "net
use". That is my app running as a service can programatically see the
drives via "net use". It is able to derive the drives that were mapped
*persisted* somehow someway. I have no idea if it's by
design or whether or not I can hang my hat on it, but it is what I
have observed.

I did not know you could have multiple logins in Windows 2008 R2. You
don't mean interactive login do you?

I hope this is clear and thanks for keeping me honest.
-Pat

>
> 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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>



Attachment: users_240736.eml (zipped)
On Mon, Mar 25, 2013 at 6:57 PM, Patrick Flaherty
<pflahrty@(protected):

>
> On Mar 25, 2013, at 1:15 PM, Howard W. Smith, Jr. wrote:
>
> On Mon, Mar 25, 2013 at 11:14 AM, Patrick Flaherty
>> <pflahrty@(protected):
>>
>> 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<users-unsubscribe@(protected)>
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment: users_240725.eml (zipped)
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

Attachment: users_240729.eml (zipped)
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:

<welcome-file-list>
  <welcome-file>default.html</welcome-file>
</welcome-file-list>

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/


Attachment: users_240727.eml (zipped)
On Mon, Mar 25, 2013 at 5:50 AM, André Warnier <aw@(protected):

> 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<users-unsubscribe@(protected)>
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment: users_240730.eml (zipped)
2013/3/25 N.s.Karthik <nskarthik.k@(protected)>:
> 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.


Attachment: users_240731.eml (zipped)
Cédric Couralet wrote:
> 2013/3/25 N.s.Karthik <nskarthik.k@(protected)>:
>> 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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>



Attachment: users_240735.eml (zipped)
Hello, Tomcat Native  have the same code base as the latest stable Tomcat release? 

Sent from Mailbox for iPhone
©2008 junlu.com - Jax Systems, LLC, U.S.A.