----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Your email seems to be about using file aliasing to redirect requests to
a login page controlled by Java authorization scheme.
The JavaWebServer that you were using delivers all content using
servlets (using a FileServlet for static pages) so a single mechanism
worked for everything. This can be a disadvantage too. My copy of JWS is
very slow at delivering images.
With Apache + ApacheJServ either application can deliver files. Requests
come to Apache first. In one project I used mod_rewrite to redirect
requests for specific .html files to an authorization servlet.
<Directory /usr/local/apache/htdocs/members>
RewriteEngine on
RewriteRule .*\.html$ /servlet/dbauthservlet [PT]
</Directory>
If the user was OK it used a Java class read the file and deliver it
back through the servlet or deliver a registration form.
It would probably be more efficient to interact with Apache's module
request loop directly and tell Apache to deliver the file or redirect
the request. There are some perl modules that do. Wish I could figure
out how to make JServ do that.
You can also can put static files outside the normal document root so
that Apache won't deliver them. Then force users to go through servlets
and append the filename as a parameter. The servlet can use a Java class
to read files send them back through it's output stream.
Servlets can do their own user authentication. I use a global access
manager running as a Singleton class in the JVM.
--Mark Ashworth
"Michael J. Giarlo" wrote:
>
> I'm running JServ 1.1b2 on Apache 1.3.6 on a Red Hat Linux 6.0 system...
>
> I just switched from JavaWebServer, and I'm very pleased so far. However,
> I'm trying to figure out how to emulate the File Aliasing functionality
> that JWS had. So, you could alias "/protected/" to "CheckLoginServlet",
> and any http requests matching /protected/* would be filtered through the
> CheckLoginServlet servlet. How would I set this up in JServ/Apache? (I
> realize there -are- other security schemes with Apache, but I'd like to
> continue using the servlet approach for developmental reasons.)
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]