Re: config 302 redirect ?

2003-11-27 Thread Pike
Hi

 Tomcat doesn't have an option like that.
strange!
There are a number of ways:
1. using the Refresh header,
2. using the Location header,
yes. hm. my real problem is, I have two different
tomcats looking at the same folders.
for each tomcat, I would like
folder A to redirect to tomcat A
folder B to redirect to tomcat B
that's why I was looking for config options.
I'll just have to change the setup.

thanks,
*-pike

http://www.fogscreen.com/
 .. tv in thin air ..

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


Re: Sending to Printer?

2003-11-27 Thread Pike
Hi

Is there any code I could use to send something to a printer?
You can use the JavaScript window.print() function ;)

That's it eh. I always try to do things without JavaScript
tomcat runs on the server. if you want to print on the client side,
you'll have to program something on the client side.  like ... 
javascript.
or a java applet. or flash (?).

if your webpage is css'ed, there are easy ways to make a 
'printerfriendly'
style without changing the page. try


	link rel=stylesheet type=text/css  href=path/to/screen.css 
media=screen  /
	link rel=stylesheet type=text/css href=path/to/print.css 
media=print /


users still have to press the printbutton (or a javascript link),
but the browser should honor a style change.
gluck,
*pike

http://www.fogscreen.com/
 .. tv in thin air ..

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


Re: HTTP instead of FTP downloads with Tomcat

2003-11-26 Thread Pike
Hi

Some of my customers cannot use FTP from their offices due to security 
restrictions.
strange. have you tried both active and passive ftp ?

I have to offer them the possibility to download files using the HTTP 
protocol.
use webdav. there is a webdav example in the tomcat distro.
with webdav, users can mount directories on their harddisk
over http (using windows' webfolders or connect to server... on 
macosx,
or using several available clients).

I suggest you create a tomcat context on their home directories
that is webdav-enabled, with all methods restricted, and another context
for their public site, without webdav. their passwords-logins
will be read from the tomcat-users.xml
http://thethirdbridge.com/doItYourself/enablingWebDAVUsingTomcat4.html
http://www.webdav.org
ps. the webdav implementation on tomcat is a little fake, but
it does support up-  downloads, move, delete etc.
good luck,
*pike
===
+ give luck a chance
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [off-topic] jakarta, java, indonesia

2003-11-21 Thread Pike

Well... actually the geek that thought up Java named it Oak.
now ... THAT is a cool name. Oh, I can see what that means
immediately. The core language is just a stem. But all the
twigs and branches are just as much part of the same tree. The
tree would be nothing without them.
This is the kind of
complex thinking that brought us product names like javabeans, kaffe,
hotjava, espresso, etc...
branches, leaves, and nuts, and bark, and roots ... hm... MUCH better

hm,
8pike
==
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: unsubscribing

2003-11-14 Thread Pike
Hi

try
	mailto:tomcat-user-unsubscribe- 
[EMAIL PROTECTED]

it should send a confirmation request to [EMAIL PROTECTED],
if this is really the address you subscribed with.
g*luck,
*pike

http://www.johntitor.com/
Time travel is achieved by altering gravity. This concept is
already proven by atomic clock experiments [...]
I have met and/or seen myself twice on different worldlines.
The first was a training mission and the second is now.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Opinions

2003-10-31 Thread Pike
Hi

It's a little thin, but what there is is at
http://jakarta.apache.org/commons/daemon/
You can do Apache administration without knowing C or PHP or perl. But 
you can't do tomcat administration without knowing java. I feel it a 
week point of Jakarta (perhaps am I wrong, it's just a feeling).
but you can do tomcat administration without knowing bash and vi ,
if you use the manager admin interfaces.
yes, you lack quite some features if you stick to those.
but just imagine the features you lack by not knowing java.
I don't think anyone will dare to rewrite the C code of apache to
change its behaviour. I feel it's a week point of apache :-)
it's a choice. I think historically tomcat was developed to give
some backbone to programmers writing applications build
on the HttpServlet interface. As a plain webserver, you still
need a programmer to set it up correctly, but a monkey can
manage it once it's running.
whatever,
*-pike
=
Microsoft: HOWTO: Read the Fucking Manual
This article demonstrates how to read the fucking manual
http://radio.weblogs.com/0001263/junk/Q209354%20-%20HOWTO.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


OT: GIF

2003-10-31 Thread Pike
Hi

You can generate jpegs and pngs but not gifs because the gif image 
format is
commercial. I think you must have a license to create gif images.
rumour is the GIF license is free again. Compuserve gave it up. Free 
software
will (in time) be able to support it again ... if they wish...

I can't really confirm that rumour though. anyone ?

cu
*pike
=
Microsoft: HOWTO: Read the Fucking Manual
This article demonstrates how to read the fucking manual
http://radio.weblogs.com/0001263/junk/Q209354%20-%20HOWTO.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: New list memberr -- Tomcat w/Win XP Pro and IE 6.1 problems

2003-09-30 Thread Pike
Hi

quoting Yoav Shapira:
unless tomcat's installation on her
machine is messed up.
her machine ? tomcat is a she ?

nice kitten...
*pike

http://www.fogscreen.com/
 .. tv in thin air ..

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


Re: jsp - string ?

2003-09-11 Thread Pike
Hi

Can be done.  This example should get you started.
that is a really nice solution !
one question
   public class MyEmailResponse extends HttpServletResponseWrapper {
  Writer out;
   public MyEmailResponse(HttpServletResponse res) {
 super(res);
 out = new StringWriter();
   }
   public Writer getWriter() {
  return out;
   }
   // You may need to override some other methods here
  };
do you have to override both getWriter() and getOutputStream(), and in 
both,
check if the other hasn't been called ? how do you know which method
tomcat or jasper internally uses ?

Then in your servlet:

  MyEmailResponse mer = new MyEmailResponse(response);
  RequestDispatcher rd = 
getServletContext().getRequestDispatcher(/myEmail.jsp);
  rd.include(request, mer);
  mer.flushBuffer();
  StringWriter sw = (StringWriter)mer.getWriter();
  String emailMessage = sw.toString();


thanks,
*pike

= 1/9671406556917033397649408 yottabyte
= 1/9444732965739290427392 zettabyte
= 1/9223372036854775808 exabyte
= 1/9007199254740992 petabyte
= 1/8796093022208 terabyte
= 1/8589934592 gigabyte
= 1/8388608 megabyte
= 1/1048576 Megabit
= 1/8192 kilobyte
= 1/1024 Kilobit
= 1/8 byte
= 1/4 nibble
bit = 1 bit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


a snooping servlet

2003-09-06 Thread Pike
Hi

I'm trying to write a servlet extension that logs the complete
request and response _body_ of any transaction.
these bodies are streaming, so to log them I need to
open the stream, read and log it, and reset it before
I let the servlet continue. I can do this in a Filter object
(i think?).
that is very ugly though.  the _good_ way to do it is probably:
create a filter that replaces request and response
objects by request and response wrappers. these
wrappers use extensions to inputstream and
outputstream that dont just read() and write(), but
also log() along the way.
but that is very ugly again ! I need to write 6 classes
and implement a whole bundle of interfaces to get
that job done.
does anyone have a simpler idea ?

thanks,
*-pike
==
Signature #1
==
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


tomcat as a proxy

2003-08-29 Thread Pike
Hi

I would like to write a servlet that  intercepts http
requests, and optionally rebuilds and redirects
them to other (remote) servers.
but tomcat doesnt know how to send remote
httprequests, does it ?
so I guess I need to incorporate a httpclient
in my project. is that correct  ? does anyone
have any experience in writing proxies ?
I've found 2 liable http client apis

jakarta-commons'
http://jakarta.apache.org/commons/httpclient/tutorial.html
and ballard's (looks great!)(supports webdav!!)
http://www.geocities.com/ballarke/Projects/HttpClient/
cu
*pike
===
404 Not Found - The weapons you are looking for are currently 
unavailable. The country might be experiencing technical difficulties, 
or you may need to adjust your weapons inspectors mandate.

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


Re: tomcat as a proxy

2003-08-29 Thread Pike
Hi

thanks for your response

I would like to write a servlet that  intercepts http
requests, and optionally rebuilds and redirects
them to other (remote) servers.

Httpclient should work fine.
ehm .. which one ? the apache/commons ?
I'm afraid that's a little too restricted...
Ideally, if you wish to have a tomcat servlet act a proxy server,
be sure you read the HTTP specs with respect to proxy servers.
There are many gotchas.
I don't think I need to. Tomcat should behave as a plain
webserver. Behind the scenes it fetches his data from elsewhere
on the web. The client doesn't need to know that.
so, maybe I shouldn't call it a proxy.

Before writing too much code and IF you are able to use apache,
it would be infinitely easier to use mod_proxy.
mod_proxy doesnt actually _do_ anything does it ? it
just proxies. I want to intercept the request and rebuild
it (with some app logic) before sending it on...
I'm surprised it seems so hard to do.
I imagined there would be something like
HttpServletRequest.dispatch(url) for remote
requests.
thanks,
*-pike

= 1/9671406556917033397649408 yottabyte
= 1/9444732965739290427392 zettabyte
= 1/9223372036854775808 exabyte
= 1/9007199254740992 petabyte
= 1/8796093022208 terabyte
= 1/8589934592 gigabyte
= 1/8388608 megabyte
= 1/1048576 Megabit
= 1/8192 kilobyte
= 1/1024 Kilobit
= 1/8 byte
= 1/4 nibble
bit = 1 bit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tomcat as a proxy

2003-08-29 Thread Pike
Hi

I would like to write a servlet that  intercepts http
requests, and optionally rebuilds and redirects
them to other (remote) servers.
Httpclient should work fine.
ehm .. which one ? the apache/commons ?
oops ... Jakarta Httpclient.
ok. but it's too restricted, it only supports some basic methods
http://jakarta.apache.org/commons/httpclient/methods.html
I think I'll go with ballarke
http://www.geocities.com/ballarke/Projects/HttpClient/
So you will
- intercept the incoming request.
- depending on the request, ask another server for data.
- Mangle the other server data
- feed back to client.
yep :-)

This sounds like reinventing the wheel since there is XML-RPC or SOAP.
(See apache axis project for more info)
? but ... I suppose the remote server should support that, then ?
I was planning to 'proxy' to plain web(dav)services.
but I think I'm right on track now

(hmm .. how a about a HttpRemoteRequestDispatcher class ... hmm...)

thanks,
*-pike
===
+ give luck a chance
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: webdav - finding class files

2003-08-28 Thread Pike
Hi

for the record

to extend the WebdavServlet, I've copied
servlet-common.jar
servlet-default.jar 
servlet-webdav.jar
and catalina.jar (oops)
from the $/server/lib into my context's /WEB-INF/lib
I had to add
tomcat-util.jar
too to do the same on tomcat5/macosx
there is a browseable example of this setup at
http://www.v2.nl/~pike/webdav/
$2c,
*pike
===
404 Not Found - The weapons you are looking for are currently 
unavailable. The country might be experiencing technical difficulties, 
or you may need to adjust your weapons inspectors mandate.

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


Re: newbie - finding class files

2003-08-27 Thread Pike
Hi

thanks for your response (sorry about the repeated post - my mistake)

What's wrong with putting them in CATALINA_HOME/common/lib?
well, nothing. it just sounds very ugly, having the same jar files
running twice in one tomcat, once in server/lib and once in common/lib.
is this how its _normally_ done ?
another point is, tomcat starts complaining about 'bundles' then,
but this may be solvable...
I found this old thread about extending WebdavServlet,
in which Andreas Probst notes his webapp cant load classes
from the $CATALINA_HOME/servlet/lib/ dir.
this url

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
makes it clear why.
but now: how should I  extend WebdavServlet inside my webapp ?
If i put my own classes in the org.apache.bla package, it can't load
the classes from my webapp, ofcourse.
should I copy all jar files from  $CATALINA_HOME/servlet/lib/*jar
to my webapps /WEB-INF/lib ?
  that should work, but it sounds ugly.



On Tue, 16 Jul 2002, Andreas Probst wrote:

Date: Tue, 16 Jul 2002 13:59:49 +0200
From: Andreas Probst [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: newbie - finding class files

On Mon, 15 Jul 2002, Andreas Probst wrote:

Hi all,

does Tomcat really look into tomcatdir/server/lib? For me it  seems
Tomcat doesn't.
This directory is only visible to the classloader for Tomcat  
itself, not
for webapps.  There is a special rule that makes servlet classes in
package org.apache.catalina available to webapps anyway, however,  
which
is why the standard WebdavServlet (as well as the other Tomcat  
features
that are available via servlets) can be loaded.

Craig
Thank you Craig.

Could you please tell more about the rule or give a pointer. The
class-loader-info of the Tomcat-Docu says nothing about the rule, but
says, that These classes and resources are TOTALLY invisible to web
applications.
Actually, the rule is very simple, and it is there in the docs.  Look  
at
the picture of the class loader hierarchy in the Tomcat docs:

   
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader- 
howto.html

The classes that are visible to a web application are those in the  
class
loader for that webapp, and any of it's parent class loaders.  In  
other
words, an application can see the WebappX class loader for itself,
plus the Shared, Common, System, and Bootstrap class loaders.  
 It
can*not* see the Catalina class loader.


thanks,
*-pike
==
Signature #1
==
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Webdav and security

2003-08-27 Thread Pike
Hi Duncan

check this
	http://www.mail-archive.com/[EMAIL PROTECTED]/ 
msg101208.html
see the http-method tags specified there ?

if i get it right, you dont want to open the methods GET and POST
for everyone, and after that, you want to restrict all methods
(PUT,DELETE,PROPFIND,etc) to a certain role
does that help ? I havent actually tried this :-)

I have included the  org.apache.catalina.servlets.WebdavServlet
in the web.xml descriptor for my application

servlet
 servlet-nameWebdavServlet/servlet-name
	servlet-classorg.apache.catalina.servlets.WebdavServlet/servlet- 
class

 servlet-mapping
 servlet-nameWebdavServlet/servlet-name
 url-pattern//url-pattern
  /servlet-mapping
It all falls down when I try to add security however.

If all requests have to go through the webdav servlet, then if I assign
the following constraint
security-constraint
 web-resource-collection
web-resource-nameThe Webdav bit/web-resource-name
url-pattern/*/url-pattern !-- or just
url-pattern//url-pattern --
 /web-resource-collection
 auth-constraint
role-namesomerole/role-name
 /auth-constraint
   /security-constraint
this means that no one can see my site unless they log in . Which is  
not
what I want of course.


goodluck,
*-pike
===
404 Not Found - The weapons you are looking for are currently  
unavailable. The country might be experiencing technical difficulties,  
or you may need to adjust your weapons inspectors mandate.

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


Class Loader skips WEB-INF/lib and shared/lib ?

2003-08-27 Thread Pike
Hi

when starting tomcat 5.0.9 on MacOSX,
one of my contexts has trouble reading files
from WEB-INF/classes and WEB-INF/lib
what strikes me most is the localhost_xxx.log (boy i hate
those datestamps in the filename :-) which tries to show
the ClassLoader delegation (I think)
it doesnt seem to find files in WEB-INF/classes
and it doesnt even look in /WEB-INF/lib or $CHOME/shared/lib ?
does this sound familiar to anyone ?

= [log snippet]

2003-08-28 00:36:55 Marking servlet xwebdav as unavailable
2003-08-28 00:36:55 Error loading WebappClassLoader
  delegate: false
  repositories:
/WEB-INF/classes/
-- Parent Classloader:
StandardClassLoader
  delegate: true
  repositories:
file:/usr/local/jakarta-tomcat-5/shared/classes/
-- Parent Classloader:
StandardClassLoader
  delegate: true
  repositories:
file:/usr/local/jakarta-tomcat-5/common/classes/
file:/usr/local/jakarta-tomcat-5/common/endorsed/xercesImpl.jar
[snip]  
file:/usr/local/jakarta-tomcat-5/common/lib/servlet-api.jar
-- Parent Classloader:
[EMAIL PROTECTED]
 nl.v2.apache.WebdavServlet
java.lang.ClassNotFoundException: nl.v2.apache.WebdavServlet
[etc]
===

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


WebdavServlet: PROPPATCH doesnt work

2003-08-23 Thread Pike
Hi

I'm sorry to keep nagging about this, but  I need to make a decision 
(soon)
and it's not in any docs or in the bugtracker (i think it should be).

can someone confirm that the WebdavServlet's
PROPPATCH  method in tomcat 4  5 doesnt work ?
if so, can someone tell me why - if it's not that hard, I could
implement it myself in a webdavservlet extension class.
our company is going to host it's media and xmldb
publicly through webdav.  I would like to use 'plain'
Tomcat instead of Slide or Tamino so we can skip the
overhead of these solutions and easily write our custom
solutions, which we usually do.
thanks,
*-pike

V2_ http://archive.v2.nl

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


WebdavServlet: PROPPATCH method in tomcat 4 5 doesnt work

2003-08-22 Thread Pike
Hi

can someone confirm that the WebdavServlet's
PROPPATCH  method in tomcat 4  5 doesnt work ?
I found it noted in several user mails;
its not noted in any docs, in fact, the javadocs suggest it should do 
'something'
its also not in the bugtracker, shouldnt it be ?

whats the use of webdav without properties ? :-)

thanks,
*-pike
==
Signature #1
==
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: E-Mail to CompuServe Customer Service

2003-08-22 Thread Pike
Hi

This list is automated, there is no human managing it.
which means, you don't have to subscribe to be allowed
to send mail to the list ?
that would seem a logical requirement; why would someone mail
the list if s/he couldn't read the replies ?
it would also stop the flooding ... since the recipients (that send
the bounce message) are not subscribed
*-pike

= 1/9671406556917033397649408 yottabyte
= 1/9444732965739290427392 zettabyte
= 1/9223372036854775808 exabyte
= 1/9007199254740992 petabyte
= 1/8796093022208 terabyte
= 1/8589934592 gigabyte
= 1/8388608 megabyte
= 1/1048576 Megabit
= 1/8192 kilobyte
= 1/1024 Kilobit
= 1/8 byte
= 1/4 nibble
bit = 1 bit
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Auto-Confirmation

2003-08-22 Thread Pike
Hey

guess what, quest is actually a list member ...
forget my previous remarks ... someone needs to unsubscribe him
Thank you for submitting your request to Quest Software Technical 
Support.
[snip]
Quest Software Technical Support - United States  949.754.8000
 Original Message
 From: Mark R. Diggory [mailto:[EMAIL PROTECTED]
 Sent: Fri, 22 Aug 2003 14:55:56 -0400
 To: Tomcat Users List [EMAIL PROTECTED]
 Subject: Re: E-Mail to CompuServe Customer Service
 Typical Microsoft!
==
+ give luck a chance
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: E-Mail to CompuServe Customer Service

2003-08-22 Thread Pike
Hi

 Yup.  It looks like an auto-responder getting flooded by sobig.
I agree,
I dont. take a look at the Quest Software autoresponses:
scroll down, and read:
 Original Message
 From: Kannan Sundararajan [mailto:[EMAIL PROTECTED]
 Sent: Fri, 22 Aug 2003 15:46:12 -0400
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Subject: RE: E-Mail to CompuServe Customer Service
 I guess some kind of spam email going on..
... the Compuserve mails may be a SoBig thing,
but the Quest mails are not.
I've tried to unsubscribe Quest, but I think it needs confirmation ...

hm..
*pike
=
+ give luck a chance

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