response.sendError() problem on Tomcat 5.5.9

2005-08-27 Thread Garret Wilson
In MyHTTPServlet.service() (extends HttpServlet.service()), I catch an exception and try to send back an error, like this: catch(final MissingResourceException missingResourceException) { response.sendError(404);//send back a 500 Internal Server Error } This code gets called, and I've

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-11 Thread Garret Wilson
is it that nothing in this world is straightforward? (That's a rhetorical question---don't feel obliged to answer.) Cheers, Garret Garret Wilson wrote: Some more info: When Web Folders first tries to access http://www.example.com/webapp/webdav/ , user agent Microsoft-WebDAV-MiniRedir/5.1.2600 tries to do

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-11 Thread Garret Wilson
Yeah, that's what I *assume*, anyway. But Ethereal doesn't work on localhost, so I can only assume. There are these possibilities: * Tomcat returns something other than 501 Not Implemented when configured on localhost. (Not likely.) * MS Web Folders does different checks when accessing the

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-11 Thread Garret Wilson
Folders is even accessing directories up the hierarchy.) Garret Parsons Technical Services wrote: Does anyone have an IIS box you can connect to to see what happens. Then maybe you can mimic it. Doug - Original Message - From: Garret Wilson [EMAIL PROTECTED] To: Tomcat Users List

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-11 Thread Garret Wilson
a security risk, and there's still another problem to track down. Thanks for your pointers, and for being a wonderful audience. ;) Garret Garret Wilson wrote: Yeah, that's what I *assume*, anyway. But Ethereal doesn't work on localhost, so I can only assume. There are these possibilities

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-11 Thread Garret Wilson
on localhost---but Dorothy, we're not on localhost anymore... Garret Garret Wilson wrote: Here's new news: Apparently the whole PROPFIND / and Apache proxy things were red herrings. The central issue seems to be that MS Web Folders doesn't know what to do with a 401 Unauthorized response

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-11 Thread Garret Wilson
Garret Wilson wrote: Apparently the whole PROPFIND / and Apache proxy things were red herrings. The central issue seems to be that MS Web Folders doesn't know what to do with a 401 Unauthorized response to an OPTIONS request on the WebDAV root folder (when it finally gets around to checking). I

Re: How to disable directory listing

2005-01-11 Thread Garret Wilson
You can't do it in your app's web.xml---unless you install another servlet (which can be the Tomcat default servlet) mapped to root in your own web.xml. But then you have to cart around all the Tomcat servlet jars in your webapp, because the one that is really the default was loaded by another

Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-10 Thread Garret Wilson
I've written a custom WebDAV servlet which works fine configured on Windows XP Professional localhost with Tomcat 5.5.4. I upload everything to a http://www.example.com/webapp/webdav/ . The domain is served on Red Hat 6 by Apache 2.0.49, which forwards to Tomcat using ProxyPass and

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-10 Thread Garret Wilson
Parsons Technical Services wrote: It may be that the login request is not getting back to you intact. Do you have another app that is protected and triggers a login prompt? Web Folders works without problems when Tomcat is running on localhost. The password dialog pops up just fine. I use

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-10 Thread Garret Wilson
Parsons Technical Services wrote: Why is MS Web Folders doing this strange OPTIONS thing with / and ignoring my 401 Unauthorized HTTP response? Did you close all IE windows prior to this last step? If not, then it never destroyed the session. I have now---same result. (Why would I care if it had

Re: Apache, Tomcat, WebDAV, and Web Folders... Oh, my!

2005-01-10 Thread Garret Wilson
some sleep right now. Thanks again to Doug and everyone else for your time. Garret Garret Wilson wrote: I've written a custom WebDAV servlet which works fine configured on Windows XP Professional localhost with Tomcat 5.5.4. I upload everything to a http://www.example.com/webapp/webdav

persistent HTTP 1.1 connections with Tomcat 5.5.4?

2005-01-06 Thread Garret Wilson
Does Tomcat 5.5.4 support HTTP 1.1 persistent connections? I'm connecting to a Tomcat servlet from a custom Java client, and the first request/response goes fine: socketAddress=new InetSocketAddress(host, port); channel=SocketChannel.open(socketAddress); inputStream=new

Re: timeout when reading 401 response [was: persistent HTTP 1.1 connections with Tomcat 5.5.4?]

2005-01-06 Thread Garret Wilson
, 06 Jan 2005 19:47:43 GMT I try to read the 952 bytes, and that's when I get the 15-second hang before a timeout. The response is generated on the server with: response.sendError(401); Where are those 952 bytes, and why can't I read them, I wonder? Garret Garret Wilson wrote: Does Tomcat 5.5.4

Re: [OT] Does anyone know this boy?

2005-01-06 Thread Garret Wilson
If you're talking about this boy: http://www.virtualtourist.com/f/p/1e331/ http://analiticamenteincorrecto.blogspot.com/ His family has already been found: http://www.phuket-inter-hospital.co.th/siriroj.html Garret Jan Behrens wrote: Hi list, I know this is OT but I do believe that everyone out

Re: timeout when reading 401 response [was: persistent HTTP 1.1 connections with Tomcat 5.5.4?]

2005-01-06 Thread Garret Wilson
can read it? Is there a bug with Channels.newInputStream()? Garret Garret Wilson wrote: It looks like the timeout is occurring when the first response is being read, so this changes the problem. I'm receiving a 401 Unauthorized response with the following headers: Server: Apache-Coyote/1.1 WWW

Re: solved: timeout when reading 401 response [was: persistent HTTP 1.1 connectionswith Tomcat 5.5.4?]

2005-01-06 Thread Garret Wilson
Wade Chandler wrote: Actually what is happening is this You are using a buffered stream. It is reading past the amount returnedand then the tcp/ip socket is blocking because you have it open as a keep alive. You have to only read the number of bytes available and not keep trying to

Re: WebDAV and redirects

2004-12-30 Thread Garret Wilson
Mark, Mark Thomas wrote: TC4 and TC5 handle requests for http://www.example.com/folder differently. TC4 does a forward to http://www.example.com/folder/ whereas TC5 issues a redirect. ... For TC4 - returns response for ../folder/ For TC5 mapped to / issues a 302 For TC5 mapped to /* returns

WebDAV and redirects

2004-12-29 Thread Garret Wilson
I've been struggling with the whole issue of Microsoft WebDAV clients failing to including a trailing slash in collection URIs even when I ask nicely. It looks like I can fix this with redirects, but that opens up another can of worms: the Microsoft client redirect bug. I'm trying to get the

questions on WebDAV implementation

2004-12-28 Thread Garret Wilson
Mark Thomas and others, I started out trying to determine how to allow the Tomcat WebDAV servlet to serve a filesystem tree outside the webapp. I've determined it will be easier for me to just roll my own WebDAV servlet from scratch, allowing me to do custom operations (such as security checks)

Re: extra directory in WebDAV servlet listing

2004-12-26 Thread Garret Wilson
Mark, Mark Thomas wrote: The webdav servlet is based around accessing the file system through a JNDI DirContext for the current webapp. I've officially started working on the configured-filesystem-root feature. The ProxyDirContext gets configured either by getting the

Re: extra directory in WebDAV servlet listing

2004-12-21 Thread Garret Wilson
Mark, Mark Thomas wrote: I'll look at the arbitrary file system root next. Thanks! I'll get to it as soon as I get more pressing things out of the way, but that may be a week or two. I currently do a file store in another part of the project and make the results available via URIs. I have two

Re: extra directory in WebDAV servlet listing

2004-12-19 Thread Garret Wilson
Mark, Mark Thomas wrote: If I can get this to work as you expect it to, it should provide a solution for how do I use webdav to manage my webapp? - something that is far from easy at the moment. I would imagine the solution might also be related to, how do I use WebDAV and yet keep users far away

Re: extra directory in WebDAV servlet listing

2004-12-18 Thread Garret Wilson
Mark, Mark Thomas wrote: Tomcat version? 5.5.4. JVM version? 5.0. OS? Windows XP Professional SP2. Garret - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

WebDAV servlet and sub-webapp collection creation

2004-12-18 Thread Garret Wilson
Trying to get @#$! Jakarta Slide to work, I created a routine that would go through the elements of a URI path and create all collections that didn't exist (using the WebDAV MKCOL method). The first time I tried it out, it worked fine---but I had forgotten that I was using the Tomcat WebDAV

extra directory in WebDAV servlet listing

2004-12-17 Thread Garret Wilson
I have the WebDAV servlet set to url-pattern/webdav/*/url-pattern. Listing is turned on. I have a subdirectory in my webapp named base, which contains dir1, dir2, and dir3. dir1 contains test1 and test2. When I get a WebDAV directory listing of http://localhost/webapp/webdav/base/dir1/ , I

wrongly URI-decoded request.getPathInfo()

2004-12-07 Thread Garret Wilson
I'm using Tomcat 5.5.4. I have an HTTP servlet mapped to /servlet/*. I send a request to the servlet on localhost like this: http://localhost/webapp/servlet/test/encoded%2Ffilename Here's what I get from the servlet request: request URI: /webapp/servlet/test/encoded%2Ffilename request URL:

WebDAV servlet bug for UTF-8 characters

2004-11-29 Thread Garret Wilson
I have a file with the character RIGHT SINGLE QUOTATION MARK U+2019 in the title. The file is listed fine when I browse to the Tomcat WebDAV enabled directory with a browser. Clicking on the file attempts to browse to the file, with the character UTF-8 encoded as %E2%80%99, but Tomcat

Re: webdav servlet file path; documentation

2004-11-29 Thread Garret Wilson
that have anything to do with the vPath of a wrapped ProxyDirContext? I'll look into this more in a couple of days. (I've noticed that others have requested this same feature.) Garret Mark Thomas wrote: From: Garret Wilson [mailto:[EMAIL PROTECTED] I can't imagine why this wouldn't be a simple change

webdav servlet file path; documentation

2004-09-25 Thread Garret Wilson
I just stumbled upon the Tomcat webdav servlet, which *almost* meets all my needs. 1. Is there some more complete documentation somewhere? By default the servlet accesses the file system inside the web context. (That is, a servlet mapped to /context/webapp/* will show files in /context/webapp/

Re: webdav servlet file path; documentation

2004-09-25 Thread Garret Wilson
Garret Wilson wrote: By default the servlet accesses the file system inside the web context. (That is, a servlet mapped to /context/webapp/* will show files in /context/webapp/ .) Ack! Apparently the servlet will allow access to files in /context/ , which is much worse? 3. How do I map

Re: valid XHTML 1.1, Tomcat, text/xml, and @!* IE

2004-09-18 Thread Garret Wilson
Morten Liebach wrote: The nicest solution is to follow the tips in this article: http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html Basically , if the HTTP_ACCEPT variable contains the string application/xhtml+xml set MIME-Type to that, otherwise set it to text/html. And no, I have no idea

Re: jstl:import---static information?

2004-09-18 Thread Garret Wilson
Garret Wilson wrote: Shouldn't the imported information be merged into the JSF component tree, rather than just spitting out the JSF tags (and all other tags) as if they were serialized literally? I've discovered several things. First, it appears you must have something like this in your

Re: valid XHTML 1.1, Tomcat, text/xml, and @!* IE

2004-09-18 Thread Garret Wilson
Oh, this is just a nightmare. Using JavaServer Faces, here are the options: 1. Just add a JSP directive: jsp:directive.page contentType=text/html/ Of course, that turns *all* pages into text/html, which we don't want to do for non-broken browsers such as Firefox and Mozilla. 2. Add a script to

Re: valid XHTML 1.1, Tomcat, text/xml, and @!* IE

2004-09-18 Thread Garret Wilson
Hassan Schroeder wrote: 3. Use a Filter -- here's a quick example, you may need to tweak it for your particular situation -- I was *just* about to check into filters (or go insane, one or the other). Thanks for the example. Note, however, that you're example doesn't enumerate *all* the accept

Re: valid XHTML 1.1, Tomcat, text/xml, and @!* IE

2004-09-18 Thread Garret Wilson
Hassan Schroeder wrote: Garret Wilson wrote: Thanks for the example. Note, however, that you're example doesn't enumerate *all* the accept headers, which means it won't work if a browser decides to sent each accept string as a separate header. True -- is that legal? I just looked at RFC2616

using character entities and JSF XML

2004-09-18 Thread Garret Wilson
So I'm trying to use the trade; character entity in a pure XML JavaServer faces file, and it doesn't let me, because it isn't defined. Fair enough; I add this: ?xml version=1.0? !DOCTYPE jsp:root [ !ENTITY trade#8482; !-- trade mark sign, U+2122 ISOnum -- ] jsp:root version=2.0

Re: using character entities and JSF XML

2004-09-18 Thread Garret Wilson
Eric, Eric Suen wrote: I didn't know that XML required internal document types to declare the root element. see bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=28207 seems tomcat guys like this stupid feature very much, even it is very easy add an option to disable those kind validation in

valid XHTML 1.1, Tomcat, text/xml, and @!* IE

2004-09-17 Thread Garret Wilson
With Tomcat 5.5.2, JSF, and JSP, I'm serving up pure, standards-compliant XHTML 1.1 that starts out with: ?xml version=1.0 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; That works just fine with FireFox,

Re: valid XHTML 1.1, Tomcat, text/xml, and @!* IE

2004-09-17 Thread Garret Wilson
these pages as text/html? How can I do that? Garret Mark Eggers wrote: On Fri, 2004-09-17 at 17:55, Garret Wilson wrote: With Tomcat 5.5.2, JSF, and JSP, I'm serving up pure, standards-compliant XHTML 1.1 that starts out with: ?xml version=1.0 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3

jstl:import---static information?

2004-09-17 Thread Garret Wilson
According to the JSF and JSTL documentation (and two JSF books), jstl:import should dynamically import information. I have: jsf:view ... jsf:subview id=navigation jstl:import url=navigation.jsp/ /jsf:subview ... /jsf:view However, everything from navigation.jsp is

Re: NullPointerException loading JavaServer Faces web application

2004-09-15 Thread Garret Wilson
Hiroshi Iwatani wrote: Tell us about whole structure of you application based on the JSF. For example, where have you put what and what? Not much to tell. I have C:\jakarta-tomcat-5.5.1\conf\Catalina\localhost\test.xml : Context docBase=C:\test\www /Context I have C:\test\www\WEB-INF\web.xml :

Re: NullPointerException loading JavaServer Faces web application

2004-09-15 Thread Garret Wilson
Shapira, Yoav wrote: - Go get Tomcat 5.5.2 and try it out if you can. Hmmm... that seems to have fixed it. Thanks for letting me know that another release was already available. Garret - To unsubscribe, e-mail: [EMAIL PROTECTED]

NullPointerException loading JavaServer Faces web application

2004-09-14 Thread Garret Wilson
In Tomcat 5.5.0 I have a simple application using the JavaServer Faces 1.1 reference implementation. ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameWeb

missing resource bundle shouldn't be

2004-09-06 Thread Garret Wilson
I just installed Tomcat 5.5.0 on Windows XP Professional SP2. I have an existing application that worked under Tomcat 4.x. It consists of a servlet in a jar file located here: \tomcat\common\lib\myservlet.jar That jar contains a servlet mapped to, for example: servlet-mapping

Re: missing resource bundle shouldn't be

2004-09-06 Thread Garret Wilson
Oh, and I'm using JDK 1.5 RC. Garret Garret Wilson wrote: I just installed Tomcat 5.5.0 on Windows XP Professional SP2. I have an existing application that worked under Tomcat 4.x. It consists of a servlet in a jar file located here: \tomcat\common\lib\myservlet.jar That jar contains a servlet

Re: missing resource bundle shouldn't be

2004-09-06 Thread Garret Wilson
else? It seems a shame that my JSP files can access the resource bundles, but my servlets can't---when the JSP files get compiled into servlets, anyway. Garret -Original Message- From: Garret Wilson [mailto:[EMAIL PROTECTED] Sent: Monday, September 06, 2004 11:40 AM To: [EMAIL PROTECTED

Re: missing resource bundle shouldn't be

2004-09-06 Thread Garret Wilson
QM wrote: : Then what's the solution? I've tried moving the jar from common/lib to : WEB-INF/lib, but that didn't help. Unjarring the files into : WEB-INF/classes didn't work, either. When you say the jar, you mean the jar containing my servlet classes, correct? Right. That should work. You

Re: missing resource bundle shouldn't be---solved

2004-09-06 Thread Garret Wilson
QM wrote: On Mon, Sep 06, 2004 at 02:55:13PM -0700, Garret Wilson wrote: : I was planning on using the same set of libraries for multiple web : apps---the jar in question had more than just servlets for a single web app. There's no need to do this, really. Webapps are supposed to be self