Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread David Smith
Here's a possibility: Write the quick and dirty blog jsp, name it blog.html, and then add this to your web.xml file: servlet-mapping servlet-namejsp/servlet-name url-patternblog.html/url-pattern /servlet-mapping The idea is to specifically map blog.html to the jsp servlet for jsp

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread hai_vu
You can also try redirect at the Apache httpd layer (I assume Tomcat is hidden behind httpd), redirecting blog.html to the 1-liner JSP file you mentioned. Hai Vu David Smith [EMAIL PROTECTED] wrote on 24/03/2008 08:13:40 AM: Here's a possibility: Write the quick and dirty blog jsp, name

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread Hassan Schroeder
On Sun, Mar 23, 2008 at 10:50 PM, DIGLLOYD INC [EMAIL PROTECTED] wrote: What is the best way to make blog.html = 2008-03-blog.html ? (eg if March 2008 is the current blog) I'd write a simple Filter that gets the current blog location from a properties file -- e.g.

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread DIGLLOYD INC
No, not behind httpd, but thanks. On Mar 24, 2008, at 5:22 AM, [EMAIL PROTECTED] wrote: You can also try redirect at the Apache httpd layer (I assume Tomcat is hidden behind httpd), redirecting blog.html to the 1-liner JSP file you mentioned. Hai Vu David Smith [EMAIL PROTECTED] wrote on

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread DIGLLOYD INC
Hassan, Thanks, this seems like it might be extensible to more than one file as well. I'm new to Servlet programming (though experienced in java), so I guess I'll hit the docs to see how to do this, unless you have a code snippet handy--thanks. Lloyd On Mar 24, 2008, at 6:48 AM,

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread DIGLLOYD INC
David, I'm new to programming Servlets/JSP, I didn't realize a servlet- mapping could just specify a url-pattern an not specify a servlet class, nor do I understand exactly what this example mapping does (and if it does it without other side-effects). Do you mean to use this in

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread Hassan Schroeder
On Mon, Mar 24, 2008 at 7:39 AM, DIGLLOYD INC [EMAIL PROTECTED] wrote: Thanks, this seems like it might be extensible to more than one file as well. I'm new to Servlet programming (though experienced in java), so I guess I'll hit the docs to see how to do this, unless you have a code

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread David Smith
servlet-mapping ... /servlet-mapping takes the name of a servlet as defined by the servlet.../servlet element, not the servlet's class. That's what the servlet ... /servlet element is for. In this case, the jsp servlet is already defined in the global web.xml file found at conf/web.xml right

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread David Smith
Oh and by the way ... Hassan's idea is really good as well. For that, you just need to write a class that implements the javax.servlet.Filter interface and define the servlet in your web.xml file. The servlet spec is an excellent resource for this kind of stuff:

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread DIGLLOYD INC
Thanks to both of you. I'll give it a try. Lloyd On Mar 24, 2008, at 8:12 AM, David Smith wrote: Oh and by the way ... Hassan's idea is really good as well. For that, you just need to write a class that implements the javax.servlet.Filter interface and define the servlet in your web.xml

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread DIGLLOYD INC
David, The URL I want to see work is http://diglloyd.com/diglloyd/blog.html (currently running on Apache with a symlink currently pointing to 2008-03-blog.html). I wrote blog.jsp which includes the current blog file: %@ include file=2008-03-blog.html % That works great for:

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread DIGLLOYD INC
David/Hassan, I've written a filter since I couldn't get the servlet-mapping approach to work. This is what I've got. It needs generalization, but it does the job. My question is this: what is the right way to forward the request? The way I'm doing it bypasses the rest of the filter

RE: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread Caldarale, Charles R
From: DIGLLOYD INC [mailto:[EMAIL PROTECTED] Subject: Re: replacement for symbolic links to files (Apache httpd to Tomcat) servlet-mapping servlet-namejsp/servlet-name url-pattern/diglloyd/blog.html/url-pattern /servlet-mapping Take out the /diglloyd,

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread DIGLLOYD INC
Chuck, Thanks, but perhaps I don't understand: - blog.html is under /diglloyd eg at http://diglloyd.com/diglloyd/blog.html eg not at the top level of the web app. Wouldn't /blog.html refer to http://diglloyd.com/blog.html ? That would be wrong... lloyd On Mar 24, 2008, at 10:58 AM,

RE: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread Caldarale, Charles R
From: DIGLLOYD INC [mailto:[EMAIL PROTECTED] Subject: Re: replacement for symbolic links to files (Apache httpd to Tomcat) Wouldn't /blog.html refer to http://diglloyd.com/blog.html ? That would be wrong... Sorry, I didn't realize your webapp is named ROOT (the default webapp), rather

Re: replacement for symbolic links to files (Apache httpd to Tomcat)

2008-03-24 Thread DIGLLOYD INC
Thanks, this worked, I didn't understand the sneaky trick of making blog.html a jsp file. servlet-mapping servlet-namejsp/servlet-name !-- Sneaky trick: make blog.html be a jsp that includes the right file -- url-pattern/diglloyd/blog.html/url-pattern /servlet-mapping The file