You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ankur bajaj <an...@gmail.com> on 2013/02/21 10:37:58 UTC
Tomcat 6 access Network drive and interact with desktop
Hi All
I have a tomcat service which when runs with local account and is allowed
to interact with desktop is not able to access network resources
but If I start this service with a username it cannot interact with the
desktop.
Is it possible that both these features can be accessed simultaneously?
I mean I need a tomcat service which can interact with desktop and can
access network resources
Regards
Ankur Bajaj
http://ankur-bajaj.blogspot.com
Re: Tomcat 6 access Network drive and interact with desktop
Posted by ankur bajaj <an...@gmail.com>.
On Fri, Feb 22, 2013 at 8:44 PM, André Warnier <aw...@ice-sa.com> wrote:
> chris derham wrote:
>
>> The first part (running programs which require a Window) usually doesn't,
>>> because those programs are usually such that they do not work "as a
>>> service". It is not usually only the fact that they need a console, but
>>> they need a whole bunch of other environment which a Service does not
>>> provide.
>>> It will only work when the other program is specifically designed to work
>>> that way.
>>> For example, OpenOffice in "headless" mode works fine. But MS-Office
>>> programs do not, and this mode of operation is explicitly indicated by
>>> Microsoft as "not recommended and not supported".
>>>
>>
>> So summarising discussion so far
>>
>> 1) services generally run headless with no interaction with desktop
>> 2) you can run a service with interaction with desktop enabled
>> 3) this doesn't work under Windows Server 2008 and later.
>>
>> So questions to OP
>>
>> a) did the link I sent help?
>>
> No the access to network resources is an issue when allowed to interact
with desktop
> b) what programs are you trying to run that open windows on desktop?
>>
> its a totally different application whose modules we are trying to access
from our application
> c) what version of os are you running under?
>>
> Its windows XP
>
>> I would add another one :
> d) can you run instead Tomcat in a command window (via setup.bat), or is
> that not possible ?
> (I do this kind of thing under similar circumstances, using a virtual
> machine so that there is no physical console accessible).
>
> our client does not wish to have an window opened in the application.
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.org<us...@tomcat.apache.org>
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
We have made an online application and have technically developed an
offline application using Tomcat
So I guess we don't have a solution
I have another related question, can we run Tomcat using javaw instead of
java , this causes no command window to appear . but there are some other
issues. is it Ok to do it like this?
Re: Tomcat 6 access Network drive and interact with desktop
Posted by André Warnier <aw...@ice-sa.com>.
chris derham wrote:
>> The first part (running programs which require a Window) usually doesn't,
>> because those programs are usually such that they do not work "as a
>> service". It is not usually only the fact that they need a console, but
>> they need a whole bunch of other environment which a Service does not
>> provide.
>> It will only work when the other program is specifically designed to work
>> that way.
>> For example, OpenOffice in "headless" mode works fine. But MS-Office
>> programs do not, and this mode of operation is explicitly indicated by
>> Microsoft as "not recommended and not supported".
>
> So summarising discussion so far
>
> 1) services generally run headless with no interaction with desktop
> 2) you can run a service with interaction with desktop enabled
> 3) this doesn't work under Windows Server 2008 and later.
>
> So questions to OP
>
> a) did the link I sent help?
> b) what programs are you trying to run that open windows on desktop?
> c) what version of os are you running under?
>
I would add another one :
d) can you run instead Tomcat in a command window (via setup.bat), or is that not possible ?
(I do this kind of thing under similar circumstances, using a virtual machine so that
there is no physical console accessible).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
Posted by chris derham <ch...@derham.me.uk>.
> The first part (running programs which require a Window) usually doesn't,
> because those programs are usually such that they do not work "as a
> service". It is not usually only the fact that they need a console, but
> they need a whole bunch of other environment which a Service does not
> provide.
> It will only work when the other program is specifically designed to work
> that way.
> For example, OpenOffice in "headless" mode works fine. But MS-Office
> programs do not, and this mode of operation is explicitly indicated by
> Microsoft as "not recommended and not supported".
So summarising discussion so far
1) services generally run headless with no interaction with desktop
2) you can run a service with interaction with desktop enabled
3) this doesn't work under Windows Server 2008 and later.
So questions to OP
a) did the link I sent help?
b) what programs are you trying to run that open windows on desktop?
c) what version of os are you running under?
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
Posted by André Warnier <aw...@ice-sa.com>.
David kerber wrote:
> On 2/22/2013 6:51 AM, chris derham wrote:
>>>>>> I mean I need a tomcat service which can interact with desktop and
>>>>>> can
>>>>>> access network resources
>>
>> Top hit when googling for 'windows service interact with desktop'
>>
>> http://lostechies.com/keithdahlby/2011/08/13/allowing-a-windows-service-to-interact-with-desktop-without-localsystem/
>>
>>
>>> The basic answer to your question is :
>>> The fact that under Windows you cannot do what you seem to want, has
>>> to do
>>> with Windows and how it handles Windows "Services". It does not
>>> depend on
>>> Tomcat in any way, and there is nothing that you can do in Tomcat to
>>> change
>>> this.
>>
>> You can flag a service as being allowed to interact with the desktop.
>> This is turned off by default
>
> And doesn't work in Windows Server 2008 and later.
>
>
>>
>>> Apart from that, there seems to be something illogical in your request.
>>
>> I think it is very strange that the server needs to open windows -
>> surely on the server nobody is going to be there to look at them?
>>
For the record, usually when people want a Service - like in this case Tomcat - to be able
to open a Window, it is because they want to run from Tomcat, another program (like Word
e.g.) which requires a window in order to work properly.
And when they want to run a Service under a normal (aka Domain) user-id, it is because
they want this service to be able to access Windos "network resources" (like network
printers or network disk "shares"). The "local service" accounts are not allowed to
access these resources.
Our OP wants to do both, I presume.
The second part (using network resources) works fine.
The first part (running programs which require a Window) usually doesn't, because those
programs are usually such that they do not work "as a service". It is not usually only
the fact that they need a console, but they need a whole bunch of other environment which
a Service does not provide.
It will only work when the other program is specifically designed to work that way.
For example, OpenOffice in "headless" mode works fine. But MS-Office programs do not, and
this mode of operation is explicitly indicated by Microsoft as "not recommended and not
supported".
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
Posted by David kerber <dc...@verizon.net>.
On 2/22/2013 6:51 AM, chris derham wrote:
>>>>> I mean I need a tomcat service which can interact with desktop and can
>>>>> access network resources
>
> Top hit when googling for 'windows service interact with desktop'
>
> http://lostechies.com/keithdahlby/2011/08/13/allowing-a-windows-service-to-interact-with-desktop-without-localsystem/
>
>> The basic answer to your question is :
>> The fact that under Windows you cannot do what you seem to want, has to do
>> with Windows and how it handles Windows "Services". It does not depend on
>> Tomcat in any way, and there is nothing that you can do in Tomcat to change
>> this.
>
> You can flag a service as being allowed to interact with the desktop.
> This is turned off by default
And doesn't work in Windows Server 2008 and later.
>
>> Apart from that, there seems to be something illogical in your request.
>
> I think it is very strange that the server needs to open windows -
> surely on the server nobody is going to be there to look at them?
>
> HTH
>
> Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
Posted by chris derham <ch...@derham.me.uk>.
>>>> I mean I need a tomcat service which can interact with desktop and can
>>>> access network resources
Top hit when googling for 'windows service interact with desktop'
http://lostechies.com/keithdahlby/2011/08/13/allowing-a-windows-service-to-interact-with-desktop-without-localsystem/
> The basic answer to your question is :
> The fact that under Windows you cannot do what you seem to want, has to do
> with Windows and how it handles Windows "Services". It does not depend on
> Tomcat in any way, and there is nothing that you can do in Tomcat to change
> this.
You can flag a service as being allowed to interact with the desktop.
This is turned off by default
> Apart from that, there seems to be something illogical in your request.
I think it is very strange that the server needs to open windows -
surely on the server nobody is going to be there to look at them?
HTH
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
Posted by André Warnier <aw...@ice-sa.com>.
Hi.
On this list, please do not "top post" (http://en.wikipedia.org/wiki/Top_posting)
It is preferred to answer in-line, or below the original question.
It makes it easier to follow the flow of conversation.
>
> On Thu, Feb 21, 2013 at 3:49 PM, chris derham <ch...@derham.me.uk> wrote:
>
>>> I mean I need a tomcat service which can interact with desktop and can
>>> access network resources
>> 'access network resources' is clear, but please define 'interact with
>> the desktop' - what do you want the app to do exactly?
>>
ankur bajaj wrote:
> Hi
>
> It opens windows from third party applications. thats what I mean by
> "interact with desktop"
>
The basic answer to your question is :
The fact that under Windows you cannot do what you seem to want, has to do with Windows
and how it handles Windows "Services". It does not depend on Tomcat in any way, and there
is nothing that you can do in Tomcat to change this.
Apart from that, there seems to be something illogical in your request.
Usually, when people run some software as a Service under Windows (or as a daemon under
Unix/Linux), it is because they want this program to run in the background, as a "server",
and do not want to interact with it via a command window.
Under Windows, if you absolutely want to allow a program (like the JVM which runs Tomcat)
to be able to run under a "normal" network user-id, /and/ allow this program to open
windows on the desktop, then you should not run it as a Service. You should run it as a
normal program, from within a logged-in session, in a command window.
You can run Tomcat that way by using the "startup.bat" command file in the Tomcat bin
directory.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
Posted by Technical Support <te...@brainstalk.com>.
Hi,
Im beginner in Linux. Can anyone help me develop my skills in Linux?
Regards
Chak Teylor
On Fri, Feb 22, 2013 at 7:07 PM, ankur bajaj <an...@gmail.com> wrote:
> Hi
>
> It opens windows from third party applications. thats what I mean by
> "interact with desktop"
>
>
> Regards
> Ankur Bajaj
> http://ankur-bajaj.blogspot.com
>
>
> On Thu, Feb 21, 2013 at 3:49 PM, chris derham <ch...@derham.me.uk> wrote:
>
> > > I mean I need a tomcat service which can interact with desktop and can
> > > access network resources
> >
> > 'access network resources' is clear, but please define 'interact with
> > the desktop' - what do you want the app to do exactly?
> >
> > Chirs
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
Re: Tomcat 6 access Network drive and interact with desktop
Posted by ankur bajaj <an...@gmail.com>.
Hi
It opens windows from third party applications. thats what I mean by
"interact with desktop"
Regards
Ankur Bajaj
http://ankur-bajaj.blogspot.com
On Thu, Feb 21, 2013 at 3:49 PM, chris derham <ch...@derham.me.uk> wrote:
> > I mean I need a tomcat service which can interact with desktop and can
> > access network resources
>
> 'access network resources' is clear, but please define 'interact with
> the desktop' - what do you want the app to do exactly?
>
> Chirs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: Tomcat 6 access Network drive and interact with desktop
Posted by chris derham <ch...@derham.me.uk>.
> I mean I need a tomcat service which can interact with desktop and can
> access network resources
'access network resources' is clear, but please define 'interact with
the desktop' - what do you want the app to do exactly?
Chirs
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
Posted by André Warnier <aw...@ice-sa.com>.
Howard W. Smith, Jr. wrote:
> On Thu, Feb 21, 2013 at 4:37 AM, ankur bajaj <an...@gmail.com> wrote:
>
>> Hi All
>>
>> I have a tomcat service which when runs with local account and is allowed
>> to interact with desktop is not able to access network resources
>> but If I start this service with a username it cannot interact with the
>> desktop.
>>
>> Is it possible that both these features can be accessed simultaneously?
>>
>> I mean I need a tomcat service which can interact with desktop and can
>> access network resources
>>
>>
> First of all, I find Andre, Chris, and David's responses very interesting.
>
> My two cents (my experience and/or requirement).
>
> 1. Never ran/used tomcat6
>
> 2. I have been using tomcat7 as a Windows Service on Windows Server 2003
> and then moved from Windows Server 2003 32-bit to Windows Server 2008 R2
> 64-bit.
>
> 3. Never really had the need for service to interact with desktop, except
> for the basic need to start/stop tomcat7 and/or adjust the properties of
> the service. tomcat7w.exe definitely fulfills this requirement of mine!!!
>
> 4. The Windows 2003 server is already the domain server/controller, and the
> network shared drives are there...if i need to access shared/network
> resources. Also, HP printer driver/software was installed 'already' (prior
> to development of the web app running via tomcat7), so when time came for
> 'silent printing', i found some java code that performs silent printing
> well, that scans the list of printers on the Windows Server 2003, and
> allows me to print (PDF document) to any one of those printers.
>
> 5. Now, I do have some plans or future requirements that I'd like to
> address immediately, where I am pushing data to QuickBooks; there is a
> QuickBooks data file still hosted on the Windows Server 2003 and the
> Windows Server 2008 is 'not' on the domain, but can talk to the rest of the
> network via tcp/ip. Also, i'm aware that QuickBooks has QuickBooks Online,
> qbXML, etc..., and I'm considering those options to push data to QuickBooks
> instead of accessing 'network resources'. Okay, it may be a quicker
> response-time to access local area network resources than push data to WAN.
> Not really a concern of mine, since the app is already pushing data to
> Google Calendar, successfully, reliably, and in a manner that performs
> quite well, too..especially, since good hardware and network connection is
> 'now' in place. :)
>
Thank you for sharing your comments and your experience.
But.. do you have a question ?
If yes, it may be better to start a new thread, with a new subject. The original OP may
not like you hijacking his very line of enquiry.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6 access Network drive and interact with desktop
Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
On Thu, Feb 21, 2013 at 4:37 AM, ankur bajaj <an...@gmail.com> wrote:
> Hi All
>
> I have a tomcat service which when runs with local account and is allowed
> to interact with desktop is not able to access network resources
> but If I start this service with a username it cannot interact with the
> desktop.
>
> Is it possible that both these features can be accessed simultaneously?
>
> I mean I need a tomcat service which can interact with desktop and can
> access network resources
>
>
First of all, I find Andre, Chris, and David's responses very interesting.
My two cents (my experience and/or requirement).
1. Never ran/used tomcat6
2. I have been using tomcat7 as a Windows Service on Windows Server 2003
and then moved from Windows Server 2003 32-bit to Windows Server 2008 R2
64-bit.
3. Never really had the need for service to interact with desktop, except
for the basic need to start/stop tomcat7 and/or adjust the properties of
the service. tomcat7w.exe definitely fulfills this requirement of mine!!!
4. The Windows 2003 server is already the domain server/controller, and the
network shared drives are there...if i need to access shared/network
resources. Also, HP printer driver/software was installed 'already' (prior
to development of the web app running via tomcat7), so when time came for
'silent printing', i found some java code that performs silent printing
well, that scans the list of printers on the Windows Server 2003, and
allows me to print (PDF document) to any one of those printers.
5. Now, I do have some plans or future requirements that I'd like to
address immediately, where I am pushing data to QuickBooks; there is a
QuickBooks data file still hosted on the Windows Server 2003 and the
Windows Server 2008 is 'not' on the domain, but can talk to the rest of the
network via tcp/ip. Also, i'm aware that QuickBooks has QuickBooks Online,
qbXML, etc..., and I'm considering those options to push data to QuickBooks
instead of accessing 'network resources'. Okay, it may be a quicker
response-time to access local area network resources than push data to WAN.
Not really a concern of mine, since the app is already pushing data to
Google Calendar, successfully, reliably, and in a manner that performs
quite well, too..especially, since good hardware and network connection is
'now' in place. :)