Access to directories outside document root?

2006-08-16 Thread Rob Elliott
Hello,

Is it possible to obtain access to an arbitrary directory (possibly
mounted file) which is not below the Tomcat webapps directory from
within a webapp? GetServletContext.getRealpath("") seems to only access
directories below the webapp app directory...

Thanks in advance...
Rob.



Information contained in this e-mail and any attachments are intended for the 
use of the addressee only, and may contain confidential information of Ubiquity 
Software Corporation.  All unauthorized use, disclosure or distribution is 
strictly prohibited.  If you are not the addressee, please notify the sender 
immediately and destroy all copies of this email.  Unless otherwise expressly 
agreed in writing signed by an officer of Ubiquity Software Corporation, 
nothing in this communication shall be deemed to be legally binding.  Thank you.



RE: Access to directories outside document root?

2006-08-16 Thread Rob Elliott
Thanks for your response.

The servlet will simply launch a Timer Task that will periodically obtain a 
list of files under /foo/bar, examine their timestamps and delete the file if 
its shelflife has expired. There is no requirement to expose anything...

Thanks,
Rob.

-Original Message-
From: Markus Schönhaber [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 9:37 AM
To: Tomcat Users List
Subject: Re: Access to directories outside document root?

Rob Elliott wrote:
> Is it possible to obtain access to an arbitrary directory (possibly
> mounted file) which is not below the Tomcat webapps directory from
> within a webapp? GetServletContext.getRealpath("") seems to only access
> directories below the webapp app directory...

What exactly do you want to achieve?

For example: If you want the contents of the directory /foo/bar to be 
accessible via, say
http:///mybardir
you simply have to create a  definition with the "docBase"-attribute 
set appropriately.

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Information contained in this e-mail and any attachments are intended for the 
use of the addressee only, and may contain confidential information of Ubiquity 
Software Corporation.  All unauthorized use, disclosure or distribution is 
strictly prohibited.  If you are not the addressee, please notify the sender 
immediately and destroy all copies of this email.  Unless otherwise expressly 
agreed in writing signed by an officer of Ubiquity Software Corporation, 
nothing in this communication shall be deemed to be legally binding.  Thank you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



web.xml config

2006-08-16 Thread Rob Elliott
Hello,

I need to deliver a WAR file to a customer. The cutomer will ultimately
need to change the webapp configuration however they would like to do so
without having to compile a new WAR file. Is it possible to change
web.xml config parameters after deployment, ideally using a GUI?

Thanks,
Rob.


Information contained in this e-mail and any attachments are intended for the 
use of the addressee only, and may contain confidential information of Ubiquity 
Software Corporation.  All unauthorized use, disclosure or distribution is 
strictly prohibited.  If you are not the addressee, please notify the sender 
immediately and destroy all copies of this email.  Unless otherwise expressly 
agreed in writing signed by an officer of Ubiquity Software Corporation, 
nothing in this communication shall be deemed to be legally binding.  Thank you.



Serve a file instead of a page using Tomcat.

2006-04-13 Thread Rob Elliott
Hello,

Users will be entering a file URL with file extension into browser. How
must you configure Tomcat to serve up a file for browser download rather
than a web page?

Thanks in advance,



Information contained in this e-mail and any attachments are intended for the 
use of the addressee only, and may contain confidential information of Ubiquity 
Software Corporation.  All unauthorized use, disclosure or distribution is 
strictly prohibited.  If you are not the addressee, please notify the sender 
immediately and destroy all copies of this email.  Unless otherwise expressly 
agreed in writing signed by an officer of Ubiquity Software Corporation, 
nothing in this communication shall be deemed to be legally binding.  Thank you.



RE: Serve a file instead of a page using Tomcat.

2006-04-13 Thread Rob Elliott
Thanks for your response,

I don't see a "web" folder for Tomcat, only under webapps. Will I need
to deploy a WAR file to do this?

Thanks...

-Original Message-
From: John Powers [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 10:17 AM
To: Tomcat Users List
Subject: RE: Serve a file instead of a page using Tomcat.

If the file is in the web folder then you can just path to it
http://localhost:8080/somedir/somefile.ext


But if it isn't, then a servlet can read in from a file stream and read
out to the servlet's out stream...




-Original Message-
From: Rob Elliott [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 8:35 AM
To: users@tomcat.apache.org
Subject: Serve a file instead of a page using Tomcat.

Hello,

Users will be entering a file URL with file extension into browser. How
must you configure Tomcat to serve up a file for browser download rather
than a web page?

Thanks in advance,



Information contained in this e-mail and any attachments are intended
for the use of the addressee only, and may contain confidential
information of Ubiquity Software Corporation.  All unauthorized use,
disclosure or distribution is strictly prohibited.  If you are not the
addressee, please notify the sender immediately and destroy all copies
of this email.  Unless otherwise expressly agreed in writing signed by
an officer of Ubiquity Software Corporation, nothing in this
communication shall be deemed to be legally binding.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Serve a file instead of a page using Tomcat.

2006-04-13 Thread Rob Elliott
I understand what you are saying... 

My appbase is the default "webapps" directory. Under webapps I created a
video\3gp folder and in it is a file video.3gp. I added the following
Mime mapping to the web.xml 


3gp
video/3gpp


I stopped and then started tomcat and entered the URL in the browser

http://localhost:8080/video/3gp/video.3gp 

however I receive 404 "The requested resource is not available...



-Original Message-
From: John Powers [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 11:13 AM
To: Tomcat Users List
Subject: RE: Serve a file instead of a page using Tomcat.

Whatever file you defined as a host in your server.xml will work..  (or
any subdirectory of course).

So if your appbase is "c:\someDirOnMachine\stuff\abc\xyz\"

And in there you have a folder called "\123\"

With a file blah.ext

You can just serve out with 

http://Hostname:port/123/blah.ext


-----Original Message-
From: Rob Elliott [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 9:26 AM
To: Tomcat Users List
Subject: RE: Serve a file instead of a page using Tomcat.

Thanks for your response,

I don't see a "web" folder for Tomcat, only under webapps. Will I need
to deploy a WAR file to do this?

Thanks...

-Original Message-
From: John Powers [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 10:17 AM
To: Tomcat Users List
Subject: RE: Serve a file instead of a page using Tomcat.

If the file is in the web folder then you can just path to it
http://localhost:8080/somedir/somefile.ext


But if it isn't, then a servlet can read in from a file stream and read
out to the servlet's out stream...




-Original Message-
From: Rob Elliott [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 8:35 AM
To: users@tomcat.apache.org
Subject: Serve a file instead of a page using Tomcat.

Hello,

Users will be entering a file URL with file extension into browser. How
must you configure Tomcat to serve up a file for browser download rather
than a web page?

Thanks in advance,



Information contained in this e-mail and any attachments are intended
for the use of the addressee only, and may contain confidential
information of Ubiquity Software Corporation.  All unauthorized use,
disclosure or distribution is strictly prohibited.  If you are not the
addressee, please notify the sender immediately and destroy all copies
of this email.  Unless otherwise expressly agreed in writing signed by
an officer of Ubiquity Software Corporation, nothing in this
communication shall be deemed to be legally binding.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Serve a file instead of a page using Tomcat.

2006-04-13 Thread Rob Elliott
Thanks for your response.

I placed it under ROOT and I get the message HTTP Status 404 -
video/3gp/video.3gp.

What's interesting is that if I enter http://localhost:8080/ I get the
admin page and then if I append video I see directory listing containing
the 3gp directory, append 3gp and see video.3gp etc. I can get to the
file this way but I want to specify the entire URL at once...

-Original Message-
From: P Y [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 12:07 PM
To: Tomcat Users List
Subject: Re: Serve a file instead of a page using Tomcat.

The default webapp is in ROOT/, so, create the directory ROOT/video
to be reached through  http://localhost:8080/video/
...

On 4/13/06, Rob Elliott <[EMAIL PROTECTED]> wrote:
> I understand what you are saying...
>
> My appbase is the default "webapps" directory. Under webapps I created
a
> video\3gp folder and in it is a file video.3gp. I added the following
> Mime mapping to the web.xml
>
> 
> 3gp
> video/3gpp
> 
>
> I stopped and then started tomcat and entered the URL in the browser
>
> http://localhost:8080/video/3gp/video.3gp
>
> however I receive 404 "The requested resource is not available...
>
>
>
> -Original Message-
> From: John Powers [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 13, 2006 11:13 AM
> To: Tomcat Users List
> Subject: RE: Serve a file instead of a page using Tomcat.
>
> Whatever file you defined as a host in your server.xml will work..
(or
> any subdirectory of course).
>
> So if your appbase is "c:\someDirOnMachine\stuff\abc\xyz\"
>
> And in there you have a folder called "\123\"
>
> With a file blah.ext
>
> You can just serve out with
>
> http://Hostname:port/123/blah.ext
>
>
> -Original Message-
> From: Rob Elliott [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 13, 2006 9:26 AM
> To: Tomcat Users List
> Subject: RE: Serve a file instead of a page using Tomcat.
>
> Thanks for your response,
>
> I don't see a "web" folder for Tomcat, only under webapps. Will I need
> to deploy a WAR file to do this?
>
> Thanks...
>
> -Original Message-
> From: John Powers [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 13, 2006 10:17 AM
> To: Tomcat Users List
> Subject: RE: Serve a file instead of a page using Tomcat.
>
> If the file is in the web folder then you can just path to it
> http://localhost:8080/somedir/somefile.ext
>
>
> But if it isn't, then a servlet can read in from a file stream and
read
> out to the servlet's out stream...
>
>
>
>
> -Original Message-
> From: Rob Elliott [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 13, 2006 8:35 AM
> To: users@tomcat.apache.org
> Subject: Serve a file instead of a page using Tomcat.
>
> Hello,
>
> Users will be entering a file URL with file extension into browser.
How
> must you configure Tomcat to serve up a file for browser download
rather
> than a web page?
>
> Thanks in advance,
>
>
>
> Information contained in this e-mail and any attachments are intended
> for the use of the addressee only, and may contain confidential
> information of Ubiquity Software Corporation.  All unauthorized use,
> disclosure or distribution is strictly prohibited.  If you are not the
> addressee, please notify the sender immediately and destroy all copies
> of this email.  Unless otherwise expressly agreed in writing signed by
> an officer of Ubiquity Software Corporation, nothing in this
> communication shall be deemed to be legally binding.  Thank you.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Serve a file instead of a page using Tomcat.

2006-04-13 Thread Rob Elliott
Yes I suspected that too and started deleting all offline content before
each attempt.. no luck.

I've become more adventurous and have now specified a "video" directory
(same level as webapps folder) and created a ROOT under it and then a
3gp\video.3gp under that. I set the localhost appbase to "video" I
stopped and then started Tomcat. I hit
http://localhost:8080/3gp/video.3gp  in the browser and I get "The page
cannot be found" I'm missing something. I found a doc stating that I
should set my "Context path" but I don't have that entry in my
server.xml. Not sure if this would have any effect or not...

Thanks..

-Original Message-
From: P Y [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 2:56 PM
To: Tomcat Users List
Subject: Re: Serve a file instead of a page using Tomcat.

On 4/13/06, Rob Elliott <[EMAIL PROTECTED]> wrote:
> Thanks for your response.
>
> I placed it under ROOT and I get the message HTTP Status 404 -
> video/3gp/video.3gp.
>
> What's interesting is that if I enter http://localhost:8080/ I get the
> admin page and then if I append video I see directory listing
containing
> the 3gp directory, append 3gp and see video.3gp etc. I can get to the
> file this way but I want to specify the entire URL at once...

I would bet it's a problem with your browser's cache.
You may want to try with another file  videooo.3gp ?
Also check the tomcat logs to make sure there's an actual request.

2.

>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Information contained in this e-mail and any attachments are intended for the 
use of the addressee only, and may contain confidential information of Ubiquity 
Software Corporation.  All unauthorized use, disclosure or distribution is 
strictly prohibited.  If you are not the addressee, please notify the sender 
immediately and destroy all copies of this email.  Unless otherwise expressly 
agreed in writing signed by an officer of Ubiquity Software Corporation, 
nothing in this communication shall be deemed to be legally binding.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Serve a file instead of a page using Tomcat.

2006-04-13 Thread Rob Elliott
BTW I do not see any request in the logs...

-Original Message-
From: Rob Elliott 
Sent: Thursday, April 13, 2006 3:12 PM
To: 'Tomcat Users List'
Subject: RE: Serve a file instead of a page using Tomcat.

Yes I suspected that too and started deleting all offline content before
each attempt.. no luck.

I've become more adventurous and have now specified a "video" directory
(same level as webapps folder) and created a ROOT under it and then a
3gp\video.3gp under that. I set the localhost appbase to "video" I
stopped and then started Tomcat. I hit
http://localhost:8080/3gp/video.3gp  in the browser and I get "The page
cannot be found" I'm missing something. I found a doc stating that I
should set my "Context path" but I don't have that entry in my
server.xml. Not sure if this would have any effect or not...

Thanks..

-Original Message-
From: P Y [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 13, 2006 2:56 PM
To: Tomcat Users List
Subject: Re: Serve a file instead of a page using Tomcat.

On 4/13/06, Rob Elliott <[EMAIL PROTECTED]> wrote:
> Thanks for your response.
>
> I placed it under ROOT and I get the message HTTP Status 404 -
> video/3gp/video.3gp.
>
> What's interesting is that if I enter http://localhost:8080/ I get the
> admin page and then if I append video I see directory listing
containing
> the 3gp directory, append 3gp and see video.3gp etc. I can get to the
> file this way but I want to specify the entire URL at once...

I would bet it's a problem with your browser's cache.
You may want to try with another file  videooo.3gp ?
Also check the tomcat logs to make sure there's an actual request.

2.

>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Information contained in this e-mail and any attachments are intended for the 
use of the addressee only, and may contain confidential information of Ubiquity 
Software Corporation.  All unauthorized use, disclosure or distribution is 
strictly prohibited.  If you are not the addressee, please notify the sender 
immediately and destroy all copies of this email.  Unless otherwise expressly 
agreed in writing signed by an officer of Ubiquity Software Corporation, 
nothing in this communication shall be deemed to be legally binding.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]