Apache, Java, & Session Cookies




Hi;

My company is using an Apache web server with a directory that contains picture files. This directory is protected by an .htaccess file such that anything trying to access the pictures will be blocked unless a login/password prompt is filled out.

From reading and experimentation I learned that the cookies Apache makes after a user logs in are not stored on a hard disk. They are something called session cookies which are stored in memory.

I have a JSP application that I would like to be able to view those pictures without having to make the user authenticate.

I was hoping to use the JSP API to write a cookie that Apache would read, and interpret as the user being logged in ( we can make a special account for the jsp app ).

My questions are:

1. Will this work?
2. Will information put into a JSP HTTPSession be read by Apache
3. What do I need to write / put into the JSP HTTPSession to authenticate with Apache.


Any thoughts will be highly appreciated.

Thanks.


Steve

Be A Healthy Vegan Or Vegetarian
http://www.geocities.com/beforewisdom/Veg/healthyVeg.html

Steve's Home Page
http://www.geocities.com/beforewisdom/

"The great American thought trap:  It is not real
unless it can be seen on television or bought in a
shopping mall"


.



Relevant Pages

  • Picture not showing correctly
    ... I have setup a apache webserver and have one web site now on it. ... The other problem is that while the folder, ... it doesn't show the pictures right. ... I've done some html coding before, but I've never had that picture ...
    (alt.html)
  • Re: Picture not showing correctly
    ... I have setup a apache webserver and have one web site now on it. ... The other problem is that while the folder, pointed to by the Alias ... it doesn't show the pictures right. ...
    (alt.html)
  • Re: How to serve java pages with Freebsd/Apache?
    ... > php5 and native cgi programs working with Apache. ... I'd like to get java ... > servlets or jsp pages working next. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: jsp files not working
    ... I have installed apache and java 6. ... Apache is working fine and opening the localhost but java is giving ... some problem as my browser is not recognising the JSP pages. ...
    (comp.lang.java.programmer)
  • Re: keine JavaServer Pages unter XP ?
    ... Apache ist ein Webserver und tut ... geeigneten Skrip-Engine verarbeitet werden muss. ... Die wohl bekannteste Servlet-Engine ist ... installiere sie und lass darin deine JSP laufen. ...
    (de.comp.lang.java)